G
Guest
the data input app im writing has some 30 + input fields and i want to be
able to format them.
I know i can use the .validate on each textbox and format the 'string'
however this require loads of repetitive codeing. Is there a way possible
to globally format the textboxes both on the .validate function, as well as
when the enter key is pressed.
Any suggestions or examples wouldbe very usefull, as i have a loads of these
data forms to create .. all requiring formatting
as a cheeky footnote before every one shouts 'Character Casing' i am using
the vbProperCase. I have this public fubction, but it strill requites a
huge amount od screen handling code.
Public Function FormatString(ByVal StringtoFormat As String, ByVal
TypeofFormat As Integer) As String
Try
Select Case TypeofFormat
Case ProperCase
FormatString = StrConv(StringtoFormat,
VbStrConv.ProperCase)
Case LowerCasing
Case UpperCasing
End Select
Catch NoFormat As Exception
MsgBox("Unable to format String. Please contatc your systems
administrator", MsgBoxStyle.Exclamation, " Formatting")
FormatString = StringtoFormat
End Try
End Function
Thank you in advance
able to format them.
I know i can use the .validate on each textbox and format the 'string'
however this require loads of repetitive codeing. Is there a way possible
to globally format the textboxes both on the .validate function, as well as
when the enter key is pressed.
Any suggestions or examples wouldbe very usefull, as i have a loads of these
data forms to create .. all requiring formatting
as a cheeky footnote before every one shouts 'Character Casing' i am using
the vbProperCase. I have this public fubction, but it strill requites a
huge amount od screen handling code.
Public Function FormatString(ByVal StringtoFormat As String, ByVal
TypeofFormat As Integer) As String
Try
Select Case TypeofFormat
Case ProperCase
FormatString = StrConv(StringtoFormat,
VbStrConv.ProperCase)
Case LowerCasing
Case UpperCasing
End Select
Catch NoFormat As Exception
MsgBox("Unable to format String. Please contatc your systems
administrator", MsgBoxStyle.Exclamation, " Formatting")
FormatString = StringtoFormat
End Try
End Function
Thank you in advance