If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
macro
I'm trying to automate a few actions whilst loading an excel spreadsheet
1. prevent the save command from showing from startup. 2. prevent the save icon from showing from startup. 3. when (eventually) exiting preventing if not pressed saveAs, the option dialog box [save-no-cancel] box from appearing. Can anyone HELP ME on this one please!!! Matt...................... |
#2
|
|||
|
|||
Matt
You could achieve this using two workbook events. The BeforeSave to stop the workbook from being saved unless it's a save as and the BeforeClose to mark the workbook 'Saved' which makes excel think no changes have been made. If these are suitable but you still need help deploying, post back Private Sub Workbook_BeforeClose(Cancel As Boolean) Me.Saved = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI = False Then MsgBox "Unable to use save on this workbook", vbOKOnly, "Saving" Cancel = True Exit Sub End If End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "matt rich" wrote in message ... I'm trying to automate a few actions whilst loading an excel spreadsheet 1. prevent the save command from showing from startup. 2. prevent the save icon from showing from startup. 3. when (eventually) exiting preventing if not pressed saveAs, the option dialog box [save-no-cancel] box from appearing. Can anyone HELP ME on this one please!!! Matt...................... |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Keyboard Shortcut Only Runs Part of the Macro | Jonnyboy117 | General Discussion | 2 | July 14th, 2004 08:27 PM |
Need Entry Point 18 Help On Access Executable File | Jeff Conrad | General Discussion | 26 | July 14th, 2004 06:00 AM |
Macro command go to last filled cell in column? | PatsyB. | Setting up and Configuration | 1 | May 17th, 2004 08:09 PM |
word error | mac | General Discussions | 1 | May 6th, 2004 08:14 AM |
Macro | Nicole | Worksheet Functions | 4 | October 9th, 2003 09:53 PM |