Skip to content

Two Class modules that are used to format a VBA Userform using the material design

License

Notifications You must be signed in to change notification settings

todar/VBA-Material-Design

Repository files navigation

VBA Material Design

Buy Me A Coffee

Two Class modules that are used to format a VBA Userform in a similar style as materialize css.

materialize

Example calling the class module from a userform:

Public mz As New materialize

'====================================================================
' INTITIALIZE/ACTIVATE
'====================================================================
Private Sub UserForm_Initialize()
    mz.Form Me
    mz.TextBox Textbox1, "Email", mzEmail, "Must be email format"
    mz.TextBox TextBox2, "Pin", mzNumeric, "Must be numeric"
    mz.Button btnSubmit, mzredlighten1, mzRedAccent2, mzwhite
End Sub

Private Sub UserForm_Activate()
    
    mz.setFocus Textbox1.name
    
End Sub

'DEMONSTRATE VALIDATE
Private Sub btnSubmit_Click()

    If mz.Validate(True) = True Then
        MsgBox "Form is valid"
    End If
    
End Sub

About

Two Class modules that are used to format a VBA Userform using the material design

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published