[RESOLVED] ShowModalAndGetNewCaption
Hi,
I came across Schmidt's ShowModalAndGetNewCaption code in this thread and it works! However, there seems to be a minor problem! After the user clicks the button to unload the form, the form does not unload on the first click but rather it takes to clicks on the button to close the form. Can this be fixed?
Thanks,
Nightwalker
Re: ShowModalAndGetNewCaption
Can you be more specific as to which option you used? And if you modified anything, probably be best to let us know that too
Re: ShowModalAndGetNewCaption
The code I am using is in post #20 and I am using the unmodified code.
Re: ShowModalAndGetNewCaption
Well, as is, seems to work fine. Click OK and calling button's caption changes & form closes. Click Cancel or Alt+F4 & calling button remains unchanged & form closes. Not replicating what you are describing
Re: ShowModalAndGetNewCaption
I figured out what the problem was!
Code:
With Add
cmdindex = Command1(index).index
Command1(index).Caption = .ShowModalAndGetNewCaption(Me, Command1(index).Caption)
.Show
End With
For some reason I had .Show in there! I should have skipped-into the code before decided whether or not to put it there! Removing the ".Show" solved the problem.