C
Chet
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
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