D
Dale Fye
I've got a custom command bar (MyFileMenu), which contains Close and Quit
options. On my Splash form, I want the Close option to only be visible if
I'm in debugging mode (I've got a function to determine if this is true or
false). So in the forms Activate event, I have the following code:
Private Sub Form_Activate()
Dim cbr as object
set cbr = Application.CommandBars("MyFileMenu")
cbr.FindControl(Tag:="MyFileQuit").Visible = True
cbr.FindControl(Tag:="MyFileClose").Visible = fnDebugging
End Sub
Then, when the user leaves the Splash screen, I want to hide the Quit option
and unhide the Close option. The following code works to accomplish this.
Private Sub Form_Deactivate()
Dim cbr as object
set cbr = Application.CommandBars("MyFileMenu")
cbr.FindControl(Tag:="MyFileQuit").Visible = False
cbr.FindControl(Tag:="MyFileClose").Visible = True
End Sub
The problem is that when the Splash screen opens, it displays both options,
even if I'm not in debugging mode. When I open another form (the splash
screen gets hidden when this happens) the Deactivate code fires and the Close
option becomes visible and the Quit option gets hidden. When I close the
second form, the Splash screens Activate code fires again, and now the Close
option visibility works based on fnDebugging( ).
I'm going batty with this, so I would appreciate any suggestions.
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
options. On my Splash form, I want the Close option to only be visible if
I'm in debugging mode (I've got a function to determine if this is true or
false). So in the forms Activate event, I have the following code:
Private Sub Form_Activate()
Dim cbr as object
set cbr = Application.CommandBars("MyFileMenu")
cbr.FindControl(Tag:="MyFileQuit").Visible = True
cbr.FindControl(Tag:="MyFileClose").Visible = fnDebugging
End Sub
Then, when the user leaves the Splash screen, I want to hide the Quit option
and unhide the Close option. The following code works to accomplish this.
Private Sub Form_Deactivate()
Dim cbr as object
set cbr = Application.CommandBars("MyFileMenu")
cbr.FindControl(Tag:="MyFileQuit").Visible = False
cbr.FindControl(Tag:="MyFileClose").Visible = True
End Sub
The problem is that when the Splash screen opens, it displays both options,
even if I'm not in debugging mode. When I open another form (the splash
screen gets hidden when this happens) the Deactivate code fires and the Close
option becomes visible and the Quit option gets hidden. When I close the
second form, the Splash screens Activate code fires again, and now the Close
option visibility works based on fnDebugging( ).
I'm going batty with this, so I would appreciate any suggestions.
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.