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: 422
Default logistics of application and procedures

I am providing templates for the employees in the office.
Each of their files(which acts as a template for them to continually use,
example jmaytimesheet.xls it contains:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Ans As Integer
Ans = MsgBox("Is your Timesheet complete and ready" & vbLf & "for
Submission to the Payroll Office?" & vbLf & "Answering No will Save it for
Further" & vbLf & "Input the Next time you return", vbYesNoCancel, "Your
Timesheet Status")
If Ans = vbYes Then
SendToProcessing
If Ans = vbNo Then ThisWorkbook.Save
End If
End Sub

and

Sub SendToProcessing()
Dim PEDate As String
Dim ECode As String
Dim SFolder As String
PEDate = Format(Range("H2"), "mmddyyyy") ' H2 = 5/28/04 as example
ECode = Range("C4").Value 'C4 = MAYJ as example
ChDir "C:\My Documents\Paymaster\PRBackUp\"
ActiveWorkbook.SaveCopyAs PEDate & ECode & ".xls"
End Sub

All files contained in C:\My Documents\Paymaster\PRBackUp \are to be
e-mailed to
the person that preapres the Payroll every two weeks. When the Payroll
person opens
each file and Prints it out for their records << which is OK But when
they try and close
each one the Workbook_BeforeClose macro runs.

How can I remove this from the files that have been Saved as 052804MAYJ.xls
so that
this situation doesn't occur? Any other advice you see let me know?
Tks in Advance,




 
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
Separating sub procedures JAW Excel Discussion (Misc queries) 4 January 28th 09 12:17 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Using Sub-procedures w/in a function LizUrish Excel Programming 2 November 6th 03 09:18 AM
what's wrong with this sub procedures? active_x[_4_] Excel Programming 8 September 10th 03 05:25 AM
VBA -- procedures as arguments? Dave Ring Excel Programming 1 August 27th 03 02:27 AM


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