Very simple Vba code

L'apprentis

Redcifer
Local time
Yesterday, 22:01
Joined
Jun 22, 2005
Messages
177
I am trying to write a code to allow the user to change the inputMask of a text box. The thing is I am not what syntax to use; My Vba is still pretty weak and i couldn't find any example, I can't see where is my mistake; help...

Code:
Private Sub FrmOption_AfterUpdate()

Select Case Me.FrmOption

    Case 1
        Me.TxtLineDim1.InputMask = [00.000\x00.000;0;_]
        
    Case 2
        Me.TxtLineDim1.InputMask = [00.000;0;_]
        
End Select
    
End Sub
 
Just of the top of my head, I'd try

Code:
Private Sub FrmOption_AfterUpdate()

Select Case Me.FrmOption

    Case 1
        Me.TxtLineDim1.InputMask = "[00.000\x00.000;0;_]"
        
    Case 2
        Me.TxtLineDim1.InputMask = "[00.000;0;_]"
        
End Select
    
End Sub
 
Cheers...

Richary, you suggestion is working, your help is well apreciated. Thank you very much.
 

Users who are viewing this thread

Back
Top Bottom