Hi,
Could you please let me know the name of the macro function,which will return the address referance of selected cell range...
m = ActiveWindow.RangeSelection.Address
The above mentioned function ,will return the address range of slected(multiplecells) to M.
but this funtion is working only in MS EXCEL...
Thanks
namar
Clarification with macro (selecting a range)
Clarification with macro (selecting a range)
OOo 2.2.X on Ms Windows XP
Re: calrification with macro(selecting a range)
wrong section: question should have been posted in Customizing and Extending>Macros and UNO API
To learn about StarBasic -which is different from Excel's VBA- see:
Andrew's Macro Document
Good luck!
To learn about StarBasic -which is different from Excel's VBA- see:
Andrew's Macro Document
Good luck!
Re: calrification with macro(selecting a range)
Moved to API forum.
Short answer: Nothing guarantees that the current user has a single range selected. It could be a multiple range selection or some type of shape. Another thread mentioning th exray tool, the SDK and linking to another thread about the active cell and it's address:
http://user.services.openoffice.org/en/ ... ges#p33942
Short answer: Nothing guarantees that the current user has a single range selected. It could be a multiple range selection or some type of shape. Another thread mentioning th exray tool, the SDK and linking to another thread about the active cell and it's address:
http://user.services.openoffice.org/en/ ... ges#p33942
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: calrification with macro(selecting a range)
Hi,
I tried to run n the the below mentioned script in the "open office calc"... But it's gives an error message ,when the control the reaches on
the statment "xray oCell"
The errror message is "Basic runtime error" sub procuedure or function procedure not defined....
Could you please help me.....
Sub Main
oDoc = thisComponent
oSheet = oDoc.Sheets.getByIndex(0)
oCell = oSheet.getCellByPosition(0, 0)
GlobalScope.BasicLibraries.loadLibrary("XrayTool")
xray oCell
oNote = oCell.getAnnotation() 'or pseudo-property .Annotation
xray oNote
oNote.setString("Hello, Note") 'or pseudo-property .String
End Sub
----------------------------------------------------------
I tried to run n the the below mentioned script in the "open office calc"... But it's gives an error message ,when the control the reaches on
the statment "xray oCell"
The errror message is "Basic runtime error" sub procuedure or function procedure not defined....
Could you please help me.....
Sub Main
oDoc = thisComponent
oSheet = oDoc.Sheets.getByIndex(0)
oCell = oSheet.getCellByPosition(0, 0)
GlobalScope.BasicLibraries.loadLibrary("XrayTool")
xray oCell
oNote = oCell.getAnnotation() 'or pseudo-property .Annotation
xray oNote
oNote.setString("Hello, Note") 'or pseudo-property .String
End Sub
----------------------------------------------------------
OOo 2.2.X on Ms Windows XP
Re: calrification with macro(selecting a range)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: calrification with macro(selecting a range)
Hi,
I have done the installation of XRAy and I have put the below mentioned code ,just above macro code which i had sent earlier,But when i ran it,I am getting another window as mentioned in the attached file...
Sub Main
Xray ThisComponent
End Sub
Could you please let me know how do i go further???
I have done the installation of XRAy and I have put the below mentioned code ,just above macro code which i had sent earlier,But when i ran it,I am getting another window as mentioned in the attached file...
Sub Main
Xray ThisComponent
End Sub
Could you please let me know how do i go further???
- Attachments
-
- untitled.zip
- (32.41 KiB) Downloaded 234 times
OOo 2.2.X on Ms Windows XP
Re: Clarification with macro (selecting a range)
Your BMP indicates the you have run a xray oCell statement - this window is the Xray Tool.
Now you can browse the properties (and their values) and (possible) methods of the object under inspection.
Get Andrew's free macro document and read it.
It helped me (and many others) a lot to understand StarBasic.
Now you can browse the properties (and their values) and (possible) methods of the object under inspection.
Get Andrew's free macro document and read it.
It helped me (and many others) a lot to understand StarBasic.