N
Nasim
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)
End Sub
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)
End Sub