Making a form not visible using a variable name

  • Thread starter Thread starter Bill Murphy
  • Start date Start date
B

Bill Murphy

I would like to pass a form name to a subroutine as a string, then make the
form not visible, something like the following:

sub HideForm(strFormName as string)

strFormName.visible = false

end sub

This fails of course. What is the correct VBA syntax when using a variable
as in this example?

Bill
 
Back
Top