Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am running the following macro and it will refresh the query but i
does not do the delete hidden rows. Help is always appreciated Thanks ActiveWorkbook.RefreshAll newHour = Hour(Now()) newMinute = Minute(Now()) newSecond = Second(Now()) + 60 waitTime = TimeSerial(newHour, newMinute, newSecond) Application.Wait waitTime Calculate Dim rDelete As Range Dim rCell As Range Dim wks As Worksheet For Each wks In Worksheets Set rDelete = Nothing For Each rCell In wks.UsedRange.Columns(1).Cells If rCell.EntireRow.Hidden Then If rDelete Is Nothing Then Set rDelete = rCell Else Set rDelete = Union(rDelete, rCell) End If End If Next rCell If Not rDelete Is Nothing Then rDelete.EntireRow.Delete Next wks End Su -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |