LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default BeforeSave macro

Gary''s Student ,

"merge must be in a standard module."

Actually it can be in the ThisWorkbook module. Also, the OP doesn't need to
start using Call. For example, this code can all be in the ThisWorkbook
module:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Test
End Sub

Sub Test()
MsgBox "test"
End Sub

Doug

"Gary''s Student" wrote in message
...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Call merge
End Sub

merge must be in a standard module.
--
Gary''s Student - gsnu200808


"Kiba" wrote:

I get and error when i try to run a module named 'Merge' in the workbook
section before save.

Sub Workbook_BeforeSave()

Merge

End Sub

How can I make this work?



 
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
Run macro with BeforeSave Event JDH Excel Programming 7 June 6th 08 07:54 PM
Trying to run macro on the BeforeSave event dmagoo22 Excel Programming 3 July 5th 06 09:38 PM
BeforeSave Steven Excel Programming 2 January 21st 06 05:37 PM
BeforeSave Sub Phil Hageman[_3_] Excel Programming 6 January 14th 04 10:12 AM
VBA - BeforeSave - NEED HELP HRobertson Excel Programming 2 October 23rd 03 06:50 PM


All times are GMT +1. The time now is 01:41 PM.

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

About Us

"It's about Microsoft Excel"