LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Run-time Error '1004' Unable to get the findnext property...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error 1004 Unable to set the top property of the picture c JB Bates[_2_] Excel Discussion (Misc queries) 1 March 3rd 10 08:04 PM
Error 1004: Unable to get the axis property Ana via OfficeKB.com Charts and Charting in Excel 1 June 24th 09 11:47 AM
Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class msk19 Excel Programming 1 July 2nd 04 06:59 PM
Run time error 1004 - Unable to get add property of the buttons class Mark[_37_] Excel Programming 0 March 1st 04 09:48 AM
Run-time error '1004' - Unable to set the Visible property of the Worksheet class Shalin Chopra Excel Programming 3 November 25th 03 08:38 PM


All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"