Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need some help:
I am trying to declare a varible of type userform so I can pass it as a paramater such as : Public ufrmForm As UserForm Sub ValidEntry(i) For Each ctlFormControl In frmNewOrder.Controls If ctlFormControl.TabIndex = i Then Worksheets("WorkingArea").Activate Range("C2") = ctlFormControl Range("E2").Select If ActiveCell.Value = "not valid" Then intError = MsgBox(strMsg, vbOKOnly, "Error") Call TextSelect(frmNewOrder, i) End If Exit For End If Next ctlFormControl End Sub Public Sub TextSelect(ufrmForm, i) For Each ctlFormControl In ufrmForm.Controls If ctlFormControl.TabIndex = i Then ctlFormControl.SelStart = 0 intTextLength = Len(ctlFormControl.Text) ctlFormControl.SelLength = intTextLength Exit For End If Next ctlFormControl End Sub not working real well...............any ideas? thanks and have a great day, Brian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform and variable | Excel Discussion (Misc queries) | |||
Variable ComboBox on Userform | Excel Programming | |||
Qn: Define a variable in Initialize for Userform | Excel Programming | |||
userform variable as global | Excel Programming | |||
Passing a value to a variable from Userform | Excel Programming |