Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a standard module I have:
Any help appreciated. Public Sub CopyFilter() Dim rng1 As Range Dim rng2 As Range Sheets("POReqs").Select With ActiveSheet.AutoFilter.Range <<< R/T Error Here _Why??? On Error Resume Next Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) .SpecialCells (xlCellTypeVisible) On Error GoTo 0 End With ..... more code follows... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, failed to add R/T comment:
Object Variable or With Block Variable not set "Jim May" wrote in message news:n_O_e.123078$Ep.67283@lakeread02... In a standard module I have: Any help appreciated. Public Sub CopyFilter() Dim rng1 As Range Dim rng2 As Range Sheets("POReqs").Select With ActiveSheet.AutoFilter.Range <<< R/T Error Here _Why??? On Error Resume Next Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) .SpecialCells (xlCellTypeVisible) On Error GoTo 0 End With .... more code follows... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You would get that error if you don't have an autofilter on the worksheet.
With the autofilter dropdowns showing, no problem ? activesheet.autofilter.Range.address $C$5:$C$17 -- Regards, Tom Ogilvy "Jim May" wrote in message news:Q1P_e.123079$Ep.58874@lakeread02... Sorry, failed to add R/T comment: Object Variable or With Block Variable not set "Jim May" wrote in message news:n_O_e.123078$Ep.67283@lakeread02... In a standard module I have: Any help appreciated. Public Sub CopyFilter() Dim rng1 As Range Dim rng2 As Range Sheets("POReqs").Select With ActiveSheet.AutoFilter.Range <<< R/T Error Here _Why??? On Error Resume Next Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) .SpecialCells (xlCellTypeVisible) On Error GoTo 0 End With .... more code follows... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |