LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default error 1004 Range object

Excellent, just tested your code. It works well and gives the same
results as setting a string of columns, so would overcome the problem I
had. Thanks for your help.

For Each ws in sceWB.Worksheets
Set myRange = Nothing
For n = 1 To sceWB.Names.Count
If ws.Name = sceWB.Names(n).RefersToRange.Worksheet.Name Then
If myRange Is Nothing Then
Set myRange = sceWB.Names(n).RefersToRange.Offset(0, -4)
Else
Set myRange = Union(myRange,
sceWB.Names(n).RefersToRange.Offset(0, -4)
End If
End If
Next

If Not (myRange Is Nothing) Then
With myRange
Set result = .Find(OrderNum, LookIn:=xlValues)
'continue processing search result

 
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 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
Runime Error 1004 Method Range of Object Global Failed Mohan[_5_] Excel Programming 3 May 21st 04 03:35 PM
"Run-time error '1004'" Method 'Range' of object '_global' failed. haisat[_2_] Excel Programming 0 October 20th 03 12:13 PM


All times are GMT +1. The time now is 12:57 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"