| View previous topic :: View next topic |
| Author |
Message |
saravanakumar.gg Newbie

Joined: 16 Jul 2005 Posts: 2
|
Posted: Sat Jul 16, 2005 3:44 am Post subject: How to access the values in a worksheet thro BASIC Macro |
|
|
I am having a file named "mysheet.xls". In the first sheet of this file i am having some value. I like to use a BASIC Macro to get the valule and to calculate. I don't know how to get connected to the sheet. _________________ Saravana Kumar G.G |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
Posted: Sat Jul 16, 2005 7:07 am Post subject: |
|
|
This should get you started: | Code: | Sub Main
oDoc = ThisComponent
oSheet = oDoc.Sheets(0) 'Assumes Sheet1
oCell = oSheet.getCellRangeByName("B5")
v = oCell.getValue
Print v," ",v*3
End Sub |
|
|
| Back to top |
|
 |
MagnusA Power User


Joined: 23 Sep 2004 Posts: 95 Location: Sweden
|
|
| Back to top |
|
 |
|