insomniac53
Board Regular
- Joined
- Sep 3, 2013
- Messages
- 104
I'm writing a subroutine called CreateFormTextBox which does exactly that - creates a text box on a specified form, puts it in the right place, formats it and fills it with a value - all done through passing a few parameters. And it works! However, the very simple Show and Hide don't work when used in conjunction with the same form variable. Here's the test sub:
The 'f' variable passes as a parameter without a problem, yet the Hide and Show will only work if I use the full form name. Any suggestions why this is happening? Thanks.
Code:
Sub test()
Dim f As MSForms.UserForm
Set f = MyTestForm
CreateFormTextBox(f, [form name and various other parameters])
f.Show
MsgBox "Done"
f.Hide
End Sub