A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macro



 
 
Thread Tools Display Modes
  #1  
Old September 9th, 2004, 12:14 AM
matt rich
external usenet poster
 
Posts: n/a
Default 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  
Old September 10th, 2004, 12:24 AM
Nick Hodge
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 06:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.