Re: Pass Userform as argument to a subroutine
I will try what you've suggested.
In the meanwhile i've found a workaround for this situation that allows me to do what what I intend to do. I've created a command button inside the Userform code module.
Code
With TempForm.CodeModule
.InsertLines .CountOfLines + 1, "Private Sub " & "CommandButton3" & "_Click()"
.InsertLines .CountOfLines + 1, "Call GetElecInfoFromUserForm(Me)"
.InsertLines .CountOfLines + 1, "End Sub"
End With
Maybe it's not not the correct way to do this, but it works.
If you have any suggestions I will apreciate. Thanks for the help Rory