| View previous topic :: View next topic |
| Author |
Message |
selijah General User

Joined: 26 Aug 2004 Posts: 10
|
Posted: Mon Dec 13, 2004 5:58 pm Post subject: help with simple macro |
|
|
I am trying the following from the StarOffice basic book and it does not work:
Sub Main
Macro1
End Sub
Sub Macro1
Dim Doc As Object
Dim Sheet As Object
Doc = StarDesktop.CurrentComponent
Sheet = Doc. Sheets (0)
msgbox("jfj")
End Sub
the error is on : Sheet = Doc. Sheets (0)
it does not find the method.
pls help. |
|
| Back to top |
|
 |
r_vinoya Super User


Joined: 03 Dec 2003 Posts: 619 Location: Somewhere in the Philippines
|
Posted: Mon Dec 13, 2004 7:47 pm Post subject: Re: help with simple macro |
|
|
| selijah wrote: | I am trying the following from the StarOffice basic book and it does not work:
Sub Main
Macro1
End Sub
Sub Macro1
Dim Doc As Object
Dim Sheet As Object
Doc = StarDesktop.CurrentComponent
Sheet = Doc. Sheets (0)
msgbox("jfj")
End Sub
the error is on : Sheet = Doc. Sheets (0)
it does not find the method.
pls help. |
Try Replacing StarDesktop.CurrentComponent by Thiscomponent
Ex.
Doc = Thiscomponent
I have no explanations.
I experience the same problem as yours when I was just starting.  _________________ # : - ) |
|
| Back to top |
|
 |
|