Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below code got subscript out of range abend on XP/Excel 2003, but works find
on excel 2000. Does range.Find function not working on Excel 2003? Any suggestion? oriReportStartRow = oriRowIndex + oriBlankLine + oriHeaderLine + oriTOTALLine oriGPStart = oriReportStartRow objSheet(orisheet).Cells(oriReportStartRow - 1, 1) = "Gross Profit" objSheet(orisheet).Cells(oriReportStartRow - 1, 1).Font.Bold = True oriRowIndex = oriReportStartRow 'test find statement Dim oriSearch As Range Set oriSearch = objSheet(orisheet).Range("A2:IV100").Find("Gross Profit", LookIn:=xlValue) ---- Abend subscript out of range??? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I finally figure out what is wrong, on excel 2000 Find function works on
both LookIn:=xlValue or LookIn:=xlValues. But Excel 2003 will abend with subscript out of range when use LookIn:=xlValue so the code shall change to : Set oriSearch = objSheet(orisheet).Range("A2:IV100").Find("Gross Profit", LookIn:=xlValues "PT91745" wrote: Below code got subscript out of range abend on XP/Excel 2003, but works find on excel 2000. Does range.Find function not working on Excel 2003? Any suggestion? oriReportStartRow = oriRowIndex + oriBlankLine + oriHeaderLine + oriTOTALLine oriGPStart = oriReportStartRow objSheet(orisheet).Cells(oriReportStartRow - 1, 1) = "Gross Profit" objSheet(orisheet).Cells(oriReportStartRow - 1, 1).Font.Bold = True oriRowIndex = oriReportStartRow 'test find statement Dim oriSearch As Range Set oriSearch = objSheet(orisheet).Range("A2:IV100").Find("Gross Profit", LookIn:=xlValue) ---- Abend subscript out of range??? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
xlvalue = xlValues?
But xl2003 won't crash when you're looking through values. I'd still bet that your worksheet didn't exist. orisheet may not be what you think it is. PT91745 wrote: I finally figure out what is wrong, on excel 2000 Find function works on both LookIn:=xlValue or LookIn:=xlValues. But Excel 2003 will abend with subscript out of range when use LookIn:=xlValue so the code shall change to : Set oriSearch = objSheet(orisheet).Range("A2:IV100").Find("Gross Profit", LookIn:=xlValues "PT91745" wrote: Below code got subscript out of range abend on XP/Excel 2003, but works find on excel 2000. Does range.Find function not working on Excel 2003? Any suggestion? oriReportStartRow = oriRowIndex + oriBlankLine + oriHeaderLine + oriTOTALLine oriGPStart = oriReportStartRow objSheet(orisheet).Cells(oriReportStartRow - 1, 1) = "Gross Profit" objSheet(orisheet).Cells(oriReportStartRow - 1, 1).Font.Bold = True oriRowIndex = oriReportStartRow 'test find statement Dim oriSearch As Range Set oriSearch = objSheet(orisheet).Range("A2:IV100").Find("Gross Profit", LookIn:=xlValue) ---- Abend subscript out of range??? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find / replace in excel 2003 | New Users to Excel | |||
I could not find XML in Excel 2003 Data | Excel Discussion (Misc queries) | |||
Excel 2003 SP3 - can't find the .cub files | Excel Discussion (Misc queries) | |||
How do i use the find and replace in excel 2003 | New Users to Excel | |||
how do i find the colors in excel 2003 | Setting up and Configuration of Excel |