I am a newbie to VBA and I am currently trying to call a userform a command button.
I am trying to write the code, so it can be reused hence using the string sForm
' When "Update button on "Dashboard" clicked, open user form
[VBA]Private Sub Update1_Click()
Call OpenUserForm("UsrFrmGetFile")
End Sub[/VBA]
and
[VBA]Option Explicit
Sub OpenUserForm(sForm As String)
sForm.Show
End Sub[/VBA]
However I recieve a compile error saying "invalid qualifier", I have searched this forum and Google, but can't understand how to pass UsrFrmGetFile to my OpenUserForm function.
Can anyone point me in the correct direction please?
Ian