Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your passing a string to FindNext as an argument and you should be passing a
range reference is one possible cause. -- Regards, Tom Ogilvy "Sworkhard" wrote in message ... What causes Run-time Error '1004' Unable to get the FindNext property of the Range class The code that causes it is: Dim vrtSheetName As Variant Dim vrtJobValue, vrtCustomerLocation As Variant Dim vrtCustomerName, vrtValidationValue As Variant Dim vrtOriginalLocation, vrtFirstAddress As Variant Dim vrtValidationValueOld As Variant Dim Msg, ans As Variant vrtSheetName = ActiveSheet.Name If ActiveCell.Row = 6 Then With Worksheets("Customers & Jobs") If Cells(7, ActiveCell.Column).Value = "Extra" Then If ActiveCell.Value = "" Then Exit Sub vrtCustomerName = Worksheets(vrtSheetName).Cells(6, ActiveCell.Column - 1).Value Worksheets("Customers & Jobs").Visible = True Set vrtCustomerLocation = Range("Customers").Find(What:=vrtCustomerName, LookIn:=xlValues) vrtJobValue = ..Cells(Range(vrtCustomerLocation.Address).Row, 5).Value vrtValidationValue = vrtJobValue vrtOriginalLocation = vrtCustomerLocation.Address Do vrtCustomerLocation = Range("Customers").FindNext(vrtOriginalLocation) vrtJobValue = Empty Set vrtJobValue = ..Cells(Range(vrtCustomerLocation).Row, 5).Value If Not vrtJobValue = Empty Then vrtValidationValueOld = vrtValidationValue vrtValidationValue = vrtValidationValueOld & "," & vrtJobValue End If Loop While vrtCustomerLocation < vrtFirstAddress And Not vrtJobValue = Empty With Worksheets(vrtSheetName).Range(ActiveCell.Address) .Validation.Delete .Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=vrtValidationValue End With Worksheets("Customers & Jobs").Visible = False Application.ScreenUpdating = True End If End With End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime Error 1004 Unable to set the top property of the picture c | Excel Discussion (Misc queries) | |||
Error 1004: Unable to get the axis property | Charts and Charting in Excel | |||
Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class | Excel Programming | |||
Run time error 1004 - Unable to get add property of the buttons class | Excel Programming | |||
Run-time error '1004' - Unable to set the Visible property of the Worksheet class | Excel Programming |