Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please help. I get an error "run-time '1004 Application-defined or
orject-defined error" on the line of code "Set CP_range = CP_range.Offset(1).Resize(CP_range.Rows.Count - 1)" The error occurs when I have a workbook with only the header row and no records below row one. The function code is below ' Function that copies rows where Category equals Priority Function CP_datarange(CP_bk As Workbook) As Range Set CP_Sh = CP_bk.Worksheets(1) CP_Sh.UsedRange.AutoFilter field:=6, Criteria1:=Trim("Priority") Set CP_range = CP_Sh.AutoFilter.Range Set CP_range = CP_range.Offset(1).Resize(CP_range.Rows.Count - 1) Set CP_datarange = CP_range End Function Request assistance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Run time error '1004': Generaol ODBC error | Excel Programming | |||
Run time error 1004 General ODCB Error | Excel Programming | |||
Application Run Time Error 1004 and Stack Error | Excel Programming |