Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Ambiguous name detected - help how fix?

I am getting an error when I click the cancel button on my userform
and I know what it means but I don't know for sure how to fix it. The
error message is "Ambigous name detected: RunStatus" I have a user
form and one option is to "cancel" out of the userform. The cancel
button is associated with a commandbutton control and in that
commandbutton I use the following code.

Private Sub CommandButton2_Click()
Unload FWRdataSortSubTtl
RunStatus = False
End Sub

This code then goes back to the main module (I hope it does anyway)
after the userform is unloaded. At this point the code should take me
to the end of the main module with the following code.

'SHOW THE DATA FORM
RunStatus = True
FWRdataSortSubTtl.Show
If Not RunStatus Then GoTo TakeToEnd

I do something like this where I use the RunStatus variable in most
all of my other main modules in personal.xls but I thought those other
instances of RunStatus were unique to those modules and would not
interfere with this instance. Any clues what I might be doing wrong?
Like I said I know what the error means but am not sure how to fix it
since I didn't think I had any duplication of the use of the variable
name in the scope of what I am doing.

Thanks,

Chet
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Ambiguous name detected - help how fix?

Sounds like you have 2 macros with the same name or two variables with the
same name. You can try to eyeball it and find the problem or maybe you
should copy/paste your code to a notepad, delete what you have, and start
over...if the overall code, modules, useforms, etc., is relatively easy to
recreate.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Chet" wrote:

I am getting an error when I click the cancel button on my userform
and I know what it means but I don't know for sure how to fix it. The
error message is "Ambigous name detected: RunStatus" I have a user
form and one option is to "cancel" out of the userform. The cancel
button is associated with a commandbutton control and in that
commandbutton I use the following code.

Private Sub CommandButton2_Click()
Unload FWRdataSortSubTtl
RunStatus = False
End Sub

This code then goes back to the main module (I hope it does anyway)
after the userform is unloaded. At this point the code should take me
to the end of the main module with the following code.

'SHOW THE DATA FORM
RunStatus = True
FWRdataSortSubTtl.Show
If Not RunStatus Then GoTo TakeToEnd

I do something like this where I use the RunStatus variable in most
all of my other main modules in personal.xls but I thought those other
instances of RunStatus were unique to those modules and would not
interfere with this instance. Any clues what I might be doing wrong?
Like I said I know what the error means but am not sure how to fix it
since I didn't think I had any duplication of the use of the variable
name in the scope of what I am doing.

Thanks,

Chet

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ambiguous name detected? Derrick Excel Discussion (Misc queries) 7 July 8th 09 07:05 PM
Ambiguous Name detected? davegb[_2_] Excel Programming 2 December 7th 07 05:09 PM
ambiguous name detected mark Excel Programming 4 February 4th 04 03:01 PM
Ambiguous Name Detected Nigel[_5_] Excel Programming 11 October 26th 03 09:59 AM
Ambiguous Name Detected:~ jaf Excel Programming 0 September 12th 03 12:56 AM


All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"