-
Load this in your UserForm module:
[vba]Private Sub TextBox1_Change()
Load UserForm1
If Val(TextBox1.Value) < Cells(1, 1) Then ' I used A1 (1,1) for my use; change to M1 (13,1) for yours.
TextBox2.Value = "A"
Else
TextBox2.Value = "B"
End If
End Sub
[/vba] Something like this is what you need to use. Notice that you do not use the IF syntax of the spreadsheet but rather the Basic syntax (for VBA in this case). If you already ahve a TextBox1_Change() event, you'll need to add this to it.
Cheers,
Last edited by RonMcK; 06-03-2008 at 10:43 AM.
Reason: Get code between vba tags.
Ron
Windermere, FL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules