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

In my project i have a before_save event with many contions and then if
all conditions are met i make a folder and name the file with info from
cell A1 ( if the file exist then it overwrites it).
Then i have a before_print event and i woulld like to save the file
before printing it. My problem is that how do i get it to go to before
save event to check the conditions then save. Currently if i want to
print it, it saves the file without the conditions met.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)(works fine)
if condition 1 then cancel = true
if condition 2 then cancel = true
else make directory
save file with value in cell A1
End Sub

Private Sub Workbook_BeforePrint(Cancel As Boolean)
if condition 1 then cancel = true (same cindition in before_save)
if condition 3 cancel = true
else
activeworkbook.save (it saves without going to before_save but it saves
with the name in A1 if the file has not been saved before)

End Sub
I am using excel 2003
Any help will be appreciated.

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
Save excel file before printing Nasim Excel Worksheet Functions 0 December 7th 06 07:18 AM
How do I save printing option for all in a shared Excel workbook? Tina Bradshaw Excel Worksheet Functions 0 February 7th 06 09:09 PM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
How do I auto-save multipage report printing to Acrobat Distiller sbutler96 Excel Discussion (Misc queries) 1 March 9th 05 04:15 AM
Getting "Save as PDF File" Dialog at end of printing to PDF using PDFwriter Chuck Reed Excel Programming 4 May 13th 04 12:01 PM


All times are GMT +1. The time now is 05:48 AM.

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"