With code in Module 6, I created a button on a sheet as follows:
ActiveSheet.Buttons.Add(1245, 16, 80, 16).Select
Selection.Caption = "AutoFocus On"
Selection.Name = "AutoFocusBut"
Selection.OnAction = "FocusOn"
Focus = True
I placed the sub "FocusOn" also in Module 6.
Public Sub FocusOn()
If Focus = True Then
...
...
When the button is depressed I get the message: "Ambigous name detected:
FocusOn".
What am I missing.
Craig
Jim Rech - 21 May 2008 16:29 GMT
My bet is you have two 'things' named FocusOn. Two subs or a sub and a
variable. Something like that.

Signature
Jim
| With code in Module 6, I created a button on a sheet as follows:
| ActiveSheet.Buttons.Add(1245, 16, 80, 16).Select
[quoted text clipped - 15 lines]
|
| Craig
Craig Brandt - 21 May 2008 16:55 GMT
Jim:
You hit the nail on the head! I had two procedures named FocusOn.
Thanks,
Craig
> My bet is you have two 'things' named FocusOn. Two subs or a sub and a
> variable. Something like that.
[quoted text clipped - 18 lines]
> |
> | Craig