juster21
Well-known Member
- Joined
- Jun 3, 2005
- Messages
- 867
I am trying to set the values on a form to the generic value. This may just be a syntax error but I can't figure it out.
I get a variable not defined error on "cboFunction.Value = wks("info").rng("D2")"
Code:
Private Sub Workbook_Open()
Dim wks As Excel.Worksheets
Dim rng As Range
'cboAetnaID.Value = wks("Info").rng("A2")
'lstPriority.ListIndex = 0 'Worksheets("Info").Range("C2")
'txtEffdate.Text = "##/##/##"
cboFunction.Value = wks("info").rng("D2")
cboSystem.Value = wks("Info").rng("E2")
cboJobTitle.Value = wks("Info").rng("F2")
cboJobTitle.Value = Worksheets("Info").Range("F2")
End Sub
I get a variable not defined error on "cboFunction.Value = wks("info").rng("D2")"