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: 2
Default Excel 2003 - Code to print and/or delete

I need help with code. With the code below, I want to be asked if I
want to delete the hours whether or not I print, but if I click "No"
to the print question, I'm not asked if I want to delete the hours.
Will someone please tell me what I need to add to my code?

Msg = "Do you want to print?"
Response = MsgBox(Msg, vbYesNo + vbQuestion)
If Response = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Msg1 = "Do you want to delete the hours?"
Response1 = MsgBox(Msg1, vbYesNo + vbQuestion)
If Response1 = vbYes Then
Range("F3:H58").Select
Selection.ClearContents
Range("F45").Select
Else
Exit Sub
End If
End If

End Sub

Thanks!
JD

 
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
Automatic delete row in Excel 2003 Marc Robinson Excel Discussion (Misc queries) 1 April 18th 08 08:12 AM
Cannot delete defalut Chartin excel 2003 מאיר Charts and Charting in Excel 3 January 16th 08 12:37 AM
Delete empty rows from print in Excel Ashfaq Excel Worksheet Functions 2 March 27th 06 12:56 PM
how can I delete the print box that pops up to show document print Prudential Excel Discussion (Misc queries) 1 February 23rd 06 11:58 AM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM


All times are GMT +1. The time now is 06:37 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"