R
rob nobel
I have a user form and as part of the procedure when I click OK is the
following ....
'Make sure a number is entered
If TextName1 = "" Then
MsgBox "You must enter a number."
Exit Sub
End If
'Transfer the number
If Range("M5") = True Then Range("O5") = TextName1
If TextName2 = "" Then
MsgBox "You must enter a date."
Exit Sub
End If
'Transfer the date
If Range("M5") = True Then Range("P5") = TextName2
1. I would like to make sure that only an integer is entered for textBox1.
2. I would like to make sure that only a date (as per long format) is
entered for textBox2.
3. Hard as I try I can't seem to put any Dim statements in for the 2
variables.
eg. Dim TextName1 as Integer always comes up with an error. (The procedure
runs fine without the Dim statements but as I understand it Dim statements
will speed up calculation time.)
Rob
following ....
'Make sure a number is entered
If TextName1 = "" Then
MsgBox "You must enter a number."
Exit Sub
End If
'Transfer the number
If Range("M5") = True Then Range("O5") = TextName1
If TextName2 = "" Then
MsgBox "You must enter a date."
Exit Sub
End If
'Transfer the date
If Range("M5") = True Then Range("P5") = TextName2
1. I would like to make sure that only an integer is entered for textBox1.
2. I would like to make sure that only a date (as per long format) is
entered for textBox2.
3. Hard as I try I can't seem to put any Dim statements in for the 2
variables.
eg. Dim TextName1 as Integer always comes up with an error. (The procedure
runs fine without the Dim statements but as I understand it Dim statements
will speed up calculation time.)
Rob