![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Excel 2003 - VBA - Ambigous Name Detected
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 |
|
|||
|
Re: Excel 2003 - VBA - Ambigous Name Detected
My bet is you have two 'things' named FocusOn. Two subs or a sub and a
variable. Something like that. -- Jim "Craig Brandt" <brandtcraig@att.net> wrote in message news:NWWYj.3$89.1@nlpi069.nbdc.sbc.com... | 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 | | |
|
|||
|
Re: Excel 2003 - VBA - Ambigous Name Detected - Thanks
Jim:
You hit the nail on the head! I had two procedures named FocusOn. Thanks, Craig "Jim Rech" <jrrech@hotmail.com> wrote in message news:uwxj6d1uIHA.4772@TK2MSFTNGP03.phx.gbl... > My bet is you have two 'things' named FocusOn. Two subs or a sub and a > variable. Something like that. > > -- > Jim > "Craig Brandt" <brandtcraig@att.net> wrote in message > news:NWWYj.3$89.1@nlpi069.nbdc.sbc.com... > | 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 > | > | > > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|