OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Macro for calc

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
as1234
General User
General User


Joined: 30 Apr 2012
Posts: 12

PostPosted: Thu May 31, 2012 12:02 pm    Post subject: Macro for calc Reply with quote

How do I create a variable and assign it the value of cell A1 ( calc) ?
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Thu May 31, 2012 12:08 pm    Post subject: Reply with quote

Code:
Sub Main
oDoc = ThisComponent
oSheet = oDoc.Sheets(0) 'Sheet1
oCell = oSheet.getCellRangeByName("A1")
v = oCell.getValue 'getString and getFormula are also available
MsgBox v
End Sub
Back to top
View user's profile Send private message
as1234
General User
General User


Joined: 30 Apr 2012
Posts: 12

PostPosted: Thu May 31, 2012 9:18 pm    Post subject: Reply with quote

Thank you very much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group