Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a large table of data which takes a while to update itself following
a recalculation. My issues is that I what to print this table out after the recalculation and after sorting the table using criteria which change during the recalculation. I can write the code to do everything except stop the printing occuring before the recalculation/sorting has taken place. What comes out of my printer is the unsorted table. How to I hold the printing process until the recalculation/sorting has taken place? Paul Smith |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Use two macros instead of one, and fire the second one (the print part) using the ontime method, with a suitable time difference so that the sorting is finished. Sub ExistingMacro() 'Code here for sorting, etc. 'Then use Application.OnTime Now + TimeValue("00:00:20"), "PrintMacro" '20 second delay End Sub Sub PrintMacro() Worksheets("SheetName").PrintOut End Sub HTH, Bernie MS Excel MVP "Paul W Smith" wrote in message ... I have a large table of data which takes a while to update itself following a recalculation. My issues is that I what to print this table out after the recalculation and after sorting the table using criteria which change during the recalculation. I can write the code to do everything except stop the printing occuring before the recalculation/sorting has taken place. What comes out of my printer is the unsorted table. How to I hold the printing process until the recalculation/sorting has taken place? Paul Smith |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the suggestion.
I could do it all as one macro using something like t = Now + 20 sec do loop until t= This all seems like a workaround. I am thinkin g there must be some way of allow a recalculation to take place before progress through code. Is this possible anyone? "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Paul, Use two macros instead of one, and fire the second one (the print part) using the ontime method, with a suitable time difference so that the sorting is finished. Sub ExistingMacro() 'Code here for sorting, etc. 'Then use Application.OnTime Now + TimeValue("00:00:20"), "PrintMacro" '20 second delay End Sub Sub PrintMacro() Worksheets("SheetName").PrintOut End Sub HTH, Bernie MS Excel MVP "Paul W Smith" wrote in message ... I have a large table of data which takes a while to update itself following a recalculation. My issues is that I what to print this table out after the recalculation and after sorting the table using criteria which change during the recalculation. I can write the code to do everything except stop the printing occuring before the recalculation/sorting has taken place. What comes out of my printer is the unsorted table. How to I hold the printing process until the recalculation/sorting has taken place? Paul Smith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting & Calculating | Excel Discussion (Misc queries) | |||
Calculating, filtering, and sorting 5 year anniversaries? | Excel Discussion (Misc queries) | |||
CALCULATING WORKSHEETS (INCLUDING AGE CALCULATING SHEETS) FOR DOWNLOADING, GREAT FOR PENSIONS/LIFE INSURANCE CALCULATIONS! | Excel Programming | |||
Sorting by date, then calculating totals | Excel Programming | |||
Calculating pagenumbers before printing | Excel Programming |