Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserForm Variable Not Defined Error

Status
Not open for further replies.

OscarAlberto

Programmer
Dec 4, 2002
15
CR
I recently included three new Checkboxes to a UserForm but I get the Error Message of the heading, indicating that the Checkboxes are "Variable not Defined".


How can I force the UserForm to recognize new items (Checkboxes, Textboxes) inmediately after being included in the physical form?
 
Did you add any code to the CheckBoxes?
If so, can you post it?
If not, what happens when you take the checkboxes off your form?
 
Unfortunately, after I posted the questions I got a "Fatal Error" prompt and couldn't save my work up to the point where I got the Variable Not Defined Error Message.

Now I get a "Type Mismatch" and the following code is highlighted:

Msg = MsgBox(vbCrLf & vbTab & _
"TERM LOAN FACILITIES - TOTAL TERM" & _
vbCrLf & vbCrLf & vbCrLf & _
"You must ENTER a NUMBER of YEARS, GREATER than ZERO and," & _
vbCrLf & vbCrLf & vbTab & _
"LESS than the TERM of the CONCESSION" & _
vbCrLf & vbCrLf & vbCrLf & _
"Do you wish to MODIFY this ENTRY?", _
vbCrLf & vbCrLf & vbCrLf, _
vbYesNo + vbDefaultButton1, _....

Could you help me with this?
 
I tried inserted a Toggle Breakpoint, and it's pointing to the code inmediately before the one I just posted, which refers to one of the new TextBoxes:

If ((Not IsNumeric(TextBox2)) Or (TextBox2.Value > Assumptions.Range("ConcessPer")) Or _
(TextBox2.Value <= 0)) Then
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top