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

[Solved]Openoffice basic equivalent for this line

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


Joined: 12 Apr 2012
Posts: 12

PostPosted: Fri May 11, 2012 3:38 am    Post subject: [Solved]Openoffice basic equivalent for this line Reply with quote

Hi ,

In VBA I have
Code:

AsciiString = AsciiString & Chr(WorksheetFunction.Hex2Dec(DataArray(Ndx)))


What would be the Openoffice basic equivalent

I tried this, but getting an error - object variable not set
Code:

Dim oSheet2, FuncService
osheet2=thiscomponent.sheets(0)
FuncService = createunoservice("com.sun.star.sheet.FunctionAccess")

AsciiString = AsciiString & Chr(FuncService.callFunction("HEX2DEC",DataArray(Ndx)))


Last edited by jaango123 on Fri May 11, 2012 9:12 am; edited 1 time in total
Back to top
View user's profile Send private message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Fri May 11, 2012 5:02 am    Post subject: Re: Openoffice basic equivalent for this line Reply with quote

The below line also giving object variable not set at the print

Code:

i=50
       print FuncService.callFunction( "HEX2DEC", i)
Back to top
View user's profile Send private message
patel
Power User
Power User


Joined: 14 Apr 2012
Posts: 54
Location: Italy

PostPosted: Fri May 11, 2012 5:32 am    Post subject: Reply with quote

You have to add "&H" befor the hex string an use cdec function, see this

Code:
Sub Hex2dec-conversion()
a = "&HBB"
b=cdec(A)
MsgBox (b)
End Sub

_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Fri May 11, 2012 7:58 am    Post subject: Reply with quote

Thanks. Please mark it as solved. I dont see that option.
Back to top
View user's profile Send private message
patel
Power User
Power User


Joined: 14 Apr 2012
Posts: 54
Location: Italy

PostPosted: Fri May 11, 2012 8:35 am    Post subject: Reply with quote

I can't, only you can do it
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
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