N
nxqviet
Hi,
I want to disable my command button when the action is successfully
carried out. Not just when clicked once.
I used:
Dim stDocName As String
stDocName = "MacroName"
DoCmd.RunMacro stDocName
Me.OtherObject.SetFocus
Me.MyCommandButton.Enabled = False
But if I had conditions in my macro, so that when conditions not match,
it will return a msgbox and stop macro from continuing. However, the
button would still be disabled after first click.
I want the button to be disabled only when the series of action in the
macro is completed. Is it possible? or do I have to use all code
instead of using part macro, part code?
Thanks all
V_
I want to disable my command button when the action is successfully
carried out. Not just when clicked once.
I used:
Dim stDocName As String
stDocName = "MacroName"
DoCmd.RunMacro stDocName
Me.OtherObject.SetFocus
Me.MyCommandButton.Enabled = False
But if I had conditions in my macro, so that when conditions not match,
it will return a msgbox and stop macro from continuing. However, the
button would still be disabled after first click.
I want the button to be disabled only when the series of action in the
macro is completed. Is it possible? or do I have to use all code
instead of using part macro, part code?
Thanks all
V_