Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array problem
I haven't used control arrays before and am having trouble with setting
up and using them on a userform. I have Private Sub UserForm_Click() End Sub Private Sub UserForm_Initialize() TextBox1(0).Visible = True For i = 1 To 5 Load TextBox1(i) TextBox1(i).Text = "A" TextBox1(i).Visible = True TextBox1(i).Left = TextBox1(i - 1).Left + 30 Next i TextBox1(0).SetFocus End Sub as the code for userform1 and a module Sub test() UserForm1.Show End Sub On the userform, I have set the Tabindex for textbox1 to 0. When I run this, I get a Runtime error 13: Type Mismatch error. Could someone tell me what is causing this please? Also, is TextBox1(0).SetFocus ok to set the focus on the first textbox? Thanks Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Control Array Sum Formula | Excel Discussion (Misc queries) | |||
Control Array Help... | Excel Programming | |||
Problem: Control Toolbox Control resizes when clicked | Excel Programming | |||
Creating a Control Array | Excel Programming | |||
Set Focus Problem for textbox control on multipage control | Excel Programming |