J
jfcby
Hello,
I've created a user form with a button to run a macro but when I click
the button I,m getting this compile error: Expected function or
Variable. What is causing this error?
Userform code:
Private Sub CommandButton2_Click()
Application.Run Project.Module1.ChangeFontTypeSize
End Sub
Modules Code:
Sub ChangeFontTypeSize()
' Change Font Type & Size
Selection.Font.Name = "MS Sans Serif"
Selection.Font.Size = 20
End Sub
Thank you for your help,
jfcby
I've created a user form with a button to run a macro but when I click
the button I,m getting this compile error: Expected function or
Variable. What is causing this error?
Userform code:
Private Sub CommandButton2_Click()
Application.Run Project.Module1.ChangeFontTypeSize
End Sub
Modules Code:
Sub ChangeFontTypeSize()
' Change Font Type & Size
Selection.Font.Name = "MS Sans Serif"
Selection.Font.Size = 20
End Sub
Thank you for your help,
jfcby