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: 34
Default Calling Macro from Workbook_BeforeClose

I am trying to have a macro run before a work book closes. All this
macro does is sort and format the new data that has been entered. I
used the following code:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Run "Sort"
End Sub

This is working and I am not sure what I have done wrong. Is it not
possible to call the macro this way? I would just put the entire macro
code in the before close but the macro that I want to run calls another
macro once it is finished. Any ideas or reference material online that
I can take a look at?

Thanks for the help once again

Kris

 
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
Calling macro from UserForm AMK4[_30_] Excel Programming 3 February 2nd 06 05:55 AM
Calling a Macro from module peter.thompson[_61_] Excel Programming 2 January 21st 06 11:14 PM
calling a macro jhahes[_25_] Excel Programming 6 August 4th 05 12:22 AM
Calling a macro from a key RWN Excel Programming 0 February 8th 05 05:19 AM
Calling macro in add-in. Clark B Excel Programming 1 July 24th 03 11:05 PM


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