what is my self?
Is this a commandbutton from the control toolbox toolbar?
And is your code behind that worksheet?
msgbox me.name
would give you the name of the sheet that holds the code.
or
application.goto me.range("a1")
to return to A1 of that sheet.
======
If you're using a button from the Forms toolbar:
Dim ActSheet as worksheet
set actsheet = activesheet
'do lots of stuff
'and you can refer to that variable
application.goto actsheet.range("a1")
'or whatever
Sonnich wrote:
Hi!
Once someone helped me to do so:
Set MyFile = Workbooks.Open(file1)
- myfile becomes an object I can work with. (thanks!)
but how do I get the place, where my button is - the sheet, on which
the event is triggered?
BR
Sonnich
--
Dave Peterson
|