TopLeftCell.Address for buttons from forms toolbar
Thanks Norman and Dick, it's 4pm on Friday, thats my excuse. I meant it
the other way around, should have been is there an equivalent for
controls toolbox button.
Norman Jones wrote:
Hi Andy,
Is there an equivalent of:
Set rng = Range(ActiveSheet.Buttons(Application.Caller). _
TopLeftCell.Address)
for buttons from forms toolbar?
That assignment statement *is* for a button from the Forms tool bar.
If you want to set the range from a Controls Toolbox button, try:
'==============
Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = Range(Me.CommandButton1.TopLeftCell.Address)
End Sub
'<<==============
---
Regards,
Norman
"Andy" wrote in message
...
Hi All
Is there an equivalent of:
Set rng = Range(ActiveSheet.Buttons(Application.Caller). _
TopLeftCell.Address)
for buttons from forms toolbar?
Cheers
Andy
|