vba – Excel Error in With

Good afternoon, boys.

I tried to pass on a part of the name that is abbreviated by parameter, but it does not work. Someone can give a light Rs, thank you guys.

Follow the subcode.

hideMenu (frmInicio.Name) & # 39; s Sub Submit the parameter



Sub hideMenu (ByVal frm As String) & # 39; The parameter stores the form name

With frm
.divMenuLateral.Visible = False & # 39; would expect frmInicio.divMenuLateral.Visible = False
.imgMenu.Visible = True
End with

End Sub