LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default pause macro to make changes before printing.

We have 4 pages in the workbook. The first 3 represent payroll info for 3
years. The 4th has summary for an employee showing the 3 years. The code
below scrolls through changing each cell reference to each employee and
printing out a report.
There are some rows that represent info that we do not want to show if it
does not pertain to an employee (bonuses). I am trying change the cell
reference and then pause while the unnecessary rows are manually hidden,
print the report and loop to the next employee.

The message box causes a pause, however the hourglass is still there and I
can't make any modifications. How do I get aroun this? It looks to me that
the macro is still running and that's why I can't make changes.

Sub macro1()
For Emp = 8 To 63
Application.Goto Reference:="Name"
ActiveCell.Replace What:=Emp, Replacement:=Emp + 1, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Find(What:=Emp, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
Application.Goto Reference:="Wages"
Selection.Replace What:=Emp, Replacement:=Emp + 1, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.Goto Reference:="Benefits"
Selection.Replace What:=Emp, Replacement:=Emp + 1, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.Goto Reference:="Hours"
Selection.Replace What:=Emp, Replacement:=Emp + 1, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.Goto Reference:="Rate"
Selection.Replace What:=Emp, Replacement:=Emp + 1, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
MsgBox ("Make changes to the report")
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next Emp
End Sub


Thanks!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pause between copies of Excel sheets while printing waybomb Excel Discussion (Misc queries) 1 August 8th 08 04:50 PM
How do I pause a macro? Dave H Excel Discussion (Misc queries) 5 May 3rd 08 04:53 PM
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
Pause Macro cottage6 Excel Programming 2 April 14th 06 04:23 PM
Pause a Macro? Jimbo Excel Programming 2 October 14th 04 04:21 AM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"