R
red6000
Hi I have a sub with 1 argument which is a userform, I then want to perform
a task dependent on which userform was passed:
Sub decide (xForm as UserForm)
Dim frm As UserForm
Set frm = xForm
If frm = UserForm1 Then
Selection.TypeText Text:= Chooser.textbox1.text
Selection.TypeText Text:= frm.textbox1.text
Else
Selection.TypeText Text:= Chooser.textbox2.text
Selection.TypeText Text:= frm.textbox1.text
End If
My code fails on the 'if' line with teh error 'mismatch'. Any ideas what
I'm doing wrong?
Thanks.
a task dependent on which userform was passed:
Sub decide (xForm as UserForm)
Dim frm As UserForm
Set frm = xForm
If frm = UserForm1 Then
Selection.TypeText Text:= Chooser.textbox1.text
Selection.TypeText Text:= frm.textbox1.text
Else
Selection.TypeText Text:= Chooser.textbox2.text
Selection.TypeText Text:= frm.textbox1.text
End If
My code fails on the 'if' line with teh error 'mismatch'. Any ideas what
I'm doing wrong?
Thanks.