Where to input a SUB function?
Yes..........beforesave event occurs when you save the workbook.
Assuming you have the macro in a general module..........just leave it
there.
Go into the VBE and select your workbook/project.
Expand MS Excel Objects.
Double-click on Thisworkbook module then paste this into that module.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Call DeleteMissingItems2002All
End Sub
Gord
On Thu, 25 Sep 2008 11:51:01 -0700, NightLord
wrote:
For the BeforeSave event, does that happen when you click Save? I would
assume so since the program isn't psychic and would know when you're getting
read to close out for the day.
But yea, that sounds like a winner.
"Gord Dibben" wrote:
As written the macro will only run manually.
To make it automatic you would need to call it from some type of Event like
workbook_open or beforeclose or beforesave.
Or when the worksheet is activated or de-activated.
When would you like the code to run?
Gord
On Wed, 24 Sep 2008 15:29:01 -0700, NightLord
wrote:
Thanks guys. HUGE help.
I've never dealt with this side of Excel before, so I was completely clueless.
Will this run on it's own, or do you have to manually run the Macro every
time?
|