PC Review


Reply
Thread Tools Rate Thread

Controlling File Save

 
 
=?Utf-8?B?TmlhbGwgWW91bmc=?=
Guest
Posts: n/a
 
      13th Nov 2006
We're using a number of Excel workbooks as input forms to an application.
The workbooks are normally opened as Read-only have their own "Save" buttons
which use Save As to make a copy of the workbook with a name constructed from
the context of what the user has entered into key cells. However the normal
Excel File->Save and toolbar icon are still there and if the someone uses
them they will get the Excel Save As dialog and suggested name "Copy of
.....xls" which we don't want. Ideally we'd like to switch the normal
behaviour to our own code.
Any ideas?
Niall
--
Making IT simpler and better
 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      13th Nov 2006
Are the "Save" buttons from the Forms Toolbar or the Control Toolbox?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Niall Young" <(E-Mail Removed)>
wrote in message
We're using a number of Excel workbooks as input forms to an application.
The workbooks are normally opened as Read-only have their own "Save" buttons
which use Save As to make a copy of the workbook with a name constructed from
the context of what the user has entered into key cells. However the normal
Excel File->Save and toolbar icon are still there and if the someone uses
them they will get the Excel Save As dialog and suggested name "Copy of
.....xls" which we don't want. Ideally we'd like to switch the normal
behaviour to our own code.
Any ideas?
Niall
--
Making IT simpler and better
 
Reply With Quote
 
=?Utf-8?B?TmlhbGwgWW91bmc=?=
Guest
Posts: n/a
 
      13th Nov 2006
Forms Toolbar
Niall
--
Making IT simpler and better


"Jim Cone" wrote:

> Are the "Save" buttons from the Forms Toolbar or the Control Toolbox?
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
>
>
> "Niall Young" <(E-Mail Removed)>
> wrote in message
> We're using a number of Excel workbooks as input forms to an application.
> The workbooks are normally opened as Read-only have their own "Save" buttons
> which use Save As to make a copy of the workbook with a name constructed from
> the context of what the user has entered into key cells. However the normal
> Excel File->Save and toolbar icon are still there and if the someone uses
> them they will get the Excel Save As dialog and suggested name "Copy of
> .....xls" which we don't want. Ideally we'd like to switch the normal
> behaviour to our own code.
> Any ideas?
> Niall
> --
> Making IT simpler and better
>

 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      13th Nov 2006
Niall,
Place this code in the "ThisWorkbook" module. It should do what you want...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not TypeName(Application.Caller) = "String" Then
MsgBox "Please use the Save button on the worksheet. ", vbExclamation, " Blame Niall"
Cancel = True
End If
End Sub
-----------
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html




"Niall Young"
<(E-Mail Removed)>
wrote in message
Forms Toolbar
Niall
--
Making IT simpler and better




"Jim Cone" wrote:
> Are the "Save" buttons from the Forms Toolbar or the Control Toolbox?
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware








> "Niall Young" <(E-Mail Removed)>
> wrote in message
> We're using a number of Excel workbooks as input forms to an application.
> The workbooks are normally opened as Read-only have their own "Save" buttons
> which use Save As to make a copy of the workbook with a name constructed from
> the context of what the user has entered into key cells. However the normal
> Excel File->Save and toolbar icon are still there and if the someone uses
> them they will get the Excel Save As dialog and suggested name "Copy of
> .....xls" which we don't want. Ideally we'd like to switch the normal
> behaviour to our own code.
> Any ideas?
> Niall
> --
> Making IT simpler and better
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling the file Steven Microsoft Excel Programming 1 21st Aug 2008 11:55 PM
Controlling an Excel File =?Utf-8?B?TS4gR3JpZmZpdGg=?= Microsoft Access 1 4th May 2005 03:40 AM
Controlling file access Walter Briscoe Microsoft Windows 2000 CMD Promt 2 10th Nov 2004 09:43 PM
Finding Who / What is Controlling a File =?Utf-8?B?R2FyeSBG?= Windows XP General 4 29th Sep 2004 04:07 AM
Controlling File Access Alan Kidner Microsoft Windows 2000 Macintosh 1 17th Dec 2003 11:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:01 AM.