Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, yes this question was asked previously but its still not solved. My
user form would enter data correctly, then I tried to add in drop down lists and now I get this error: Run-time error '1004': Method 'Range of object'_Worksheet'failed Some helpful people have determined the problem is probably in my initilization code- but I can't find the error -- Can you?? Private Sub UserForm_Initialize() Dim cClient As Range Dim cCategory As Range Dim cSubCategory As Range Dim cCompetency As Range Dim cIndustry As Range Dim cOriginator As Range Dim cConfidentiality As Range Dim cIssue As Range Dim cAdditionalEditors As Range Dim ws As Worksheet Set ws = Worksheets("LookupLists") For Each cClient In ws.Range("ClientList") With Me.cbClient ..AddItem cClient.Value ..List(.ListCount - 1, 1) = cClient.Offset(0.1).Value End With Next cClient For Each cCategory In ws.Range("CategoryList") With Me.cbCategory ..AddItem cCategory.Value ..List(.ListCount - 1, 1) = cCategory.Offset(0, 1).Value End With Next cCategory For Each cSubCategory In ws.Range("SubCategoryList") With Me.cbSubCategory ..AddItem cSubCategory.Value ..List(.ListCount - 1, 1) = cSubCategory.Offset(0, 1).Value End With Next cSubCategory For Each cCompetency In ws.Range("CompetencyList") With Me.cbCompetency ..AddItem cCompetency.Value ..List(.ListCount - 1, 1) = cCompetency.Offset(0, 1).Value End With Next cCompetency For Each cIndustry In ws.Range("IndustryList") With Me.cbIndustry ..AddItem cIndustry.Value ..List(.ListCount - 1, 1) = cIndustry.Offset(0, 1).Value End With Next cIndustry For Each cOriginator In ws.Range("OriginatorList") With Me.cbOriginator ..AddItem cOriginator.Value ..List(.ListCount - 1.1) = cOriginator.Offset(0.1).Value End With Next cOriginator For Each cConfidentiality In ws.Range("ConfidentialityList") With Me.cbConfidentiality ..AddItem cConfidentiality.Value ..List(.ListCount - 1, 1) = cConfidentiality.Offset(0, 1).Value End With Next cConfidentiality For Each cIssue In ws.Range("IssueList") With Me.cbClientBusinessIssue ..AddItem cIssue.Value ..List(.ListCount - 1, 1) = cIssue.Offset(0, 1).Value End With Next cIssue For Each cAdditionalEditors In ws.Range("AdditionalEditorsList") With Me.cbAdditionalEditors ..AddItem cAdditionalEditors.Value ..List(.ListCount - 1, 1) = cAdditionalEditors.Offset(0, 1).Value End With Next cAdditionalEditors Me.txtDate.Value = Format(Date, "Short Date") Me.txtTitle.SetFocus End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Run time error '1004': Generaol ODBC error | Excel Programming | |||
Run time error 1004 General ODCB Error | Excel Programming | |||
Application Run Time Error 1004 and Stack Error | Excel Programming |