Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Workbook_BeforePrint

I want the test the result of a msgbox in the
Workbook_BeforePrint event. If the users clicks Yes,
print the spreadsheet, if the user clicks No, do not print.

I forget how to accomplish this.

TIA

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Workbook_BeforePrint

Here is the basic idea. Adapt within the before print macro of the
ThisWorkbook module

Sub askem()
ans = InputBox("Do you want to print? yes or no", vbYesNo)
If ans = "yes" Then
MsgBox "go"
Else
MsgBox "nogo"
End If
End Sub

--
Don Guillett
SalesAid Software

"Squid" wrote in message
...
I want the test the result of a msgbox in the
Workbook_BeforePrint event. If the users clicks Yes,
print the spreadsheet, if the user clicks No, do not print.

I forget how to accomplish this.

TIA

Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Workbook_BeforePrint


ans = MsgBox(msg, vbYesNo, title)
If ans = vbYes Then
' do it
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Squid" wrote in message
...
I want the test the result of a msgbox in the
Workbook_BeforePrint event. If the users clicks Yes,
print the spreadsheet, if the user clicks No, do not print.

I forget how to accomplish this.

TIA

Mike



Reply
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
Problem - Workbook_BeforePrint JON-JON Excel Programming 3 August 26th 03 01:19 PM


All times are GMT +1. The time now is 11:21 PM.

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

About Us

"It's about Microsoft Excel"