D
Don Wiss
I have a multipage form in xl2002. After adding some code it has been
giving me an error message if I run a line of code that sets the focus (in
an input error routine). I then get the exact equivalent of:
MsgBox "Invalid property value.", vbExclamation, "Microsoft Forms"
This MsgBox then pops up twice if I try to change tabs, which it then won't
let me do. Or it pops up once if I try to close the form with a cancel,
which it also then won't let me do. I can close the form with the X in the
upper right, but then after the form closes I get this MsgBox.
The line of code with the SetFocus was copied from elsewhere. What is
different on these lines is I am setting the focus on a combo box with a
value that is no longer in the RowSource range. If I comment out the
SetFocus line, run the error code, and set the focus there manually, I have
no problems. The combo box has match required.
I can, of course, not have the program set the focus and let the user
figure out which input has the error. Or I could clear the wrong input.
Neither is ideal. Any other suggestions?
Don <www.donwiss.com> (e-mail link at home page bottom).
giving me an error message if I run a line of code that sets the focus (in
an input error routine). I then get the exact equivalent of:
MsgBox "Invalid property value.", vbExclamation, "Microsoft Forms"
This MsgBox then pops up twice if I try to change tabs, which it then won't
let me do. Or it pops up once if I try to close the form with a cancel,
which it also then won't let me do. I can close the form with the X in the
upper right, but then after the form closes I get this MsgBox.
The line of code with the SetFocus was copied from elsewhere. What is
different on these lines is I am setting the focus on a combo box with a
value that is no longer in the RowSource range. If I comment out the
SetFocus line, run the error code, and set the focus there manually, I have
no problems. The combo box has match required.
I can, of course, not have the program set the focus and let the user
figure out which input has the error. Or I could clear the wrong input.
Neither is ideal. Any other suggestions?
Don <www.donwiss.com> (e-mail link at home page bottom).