ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
On my userform i have this in a textbox.
Currently it will only allow a currency value.
But i now have a reason to have it allow N/A or a currency value.
Anything other than a currency value then pops up the Message.
Please advise thanks.
Currently it will only allow a currency value.
But i now have a reason to have it allow N/A or a currency value.
Anything other than a currency value then pops up the Message.
Please advise thanks.
VBA Code:
Private Sub TextBox5_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
If Len(TextBox5) = 0 Then Exit Sub
If IsNumeric(TextBox5) Then
TextBox5 = Format(TextBox5, "£#,##0.00")
Else
MsgBox "THE QUOTED VALUE MUST BE £ FIGURE.", vbCritical, "THERE WAS NO £ IN QUOTED FIELD MESSAGE"
TextBox5 = ""
Cancel = True
End If
End Sub