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: 7
Default Find function for a Range failing in excel 2003 and giving subscriptout of range error 9 problem but works fine in excel 2000

Set mwbStore = Application.Workbooks.Add()
For n = 0 To UBound(mwbD)
For Each wks In mwbD(n).Worksheets
Set rng = wks.UsedRange.Columns(1)
Set cel = Nothing
*******Problem Line
Set cel = rng.Find(What:=storeNum, LookAt:=xlWhole, _
LookIn:=xlValue,
SearchOrder:=xlByColumns)
*****End Problem Line

The basic thing is that in a workbook BUDGET1 sheet we are having
first column as store names defind as a range.

It is picking the store name and trying to find that store name in
that first column defined as range in BUDGET1 sheet.

The same function

Set cel = rng.Find(What:=storeNum, LookAt:=xlWhole, _
LookIn:=xlValue,
SearchOrder:=xlByColumns)

is running fine in excel 2000 but gives Subscript out of range error 9
in excel 2003
 
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
Excel 2000 clocks -- Excel 2003 works fine. Arne M. Wiechmann Excel Programming 0 February 16th 08 12:12 AM
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 gromit12 Excel Discussion (Misc queries) 2 November 6th 07 09:30 PM
Visual Basic Function works fine in Excell 2003 but not in Excel 2 Roger Excel Discussion (Misc queries) 8 August 1st 07 03:56 AM
Pivot table is not valid in Excel 2000 but works fine in EXCEL 200 Ulrik Loves Horses Excel Discussion (Misc queries) 1 December 18th 06 03:08 PM
#VALUE! error: vlookup works in Excel 2000 but not 2003 Nick Ersdown Excel Discussion (Misc queries) 6 November 25th 05 12:23 PM


All times are GMT +1. The time now is 01:58 AM.

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"