autoclose without saving.

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
781
I have taken a workbook with numerous macros that I want to make available to several users & placed it on a shared network drive. Then I placed a shortcut to that workbook in each of the users excel/startup folder
and I then Shared the workbook.

All is good except that whenever one closes excel it wants to SAVE that workbook. How can I keep that from happening?

I want the file to just close without saving or offering that option.
Any Ideas?
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

sweater_vests_rock

Well-known Member
Joined
Oct 8, 2004
Messages
1,657
selkov.

one option would be to make your workbook an add-in, which does not require a user to save. the other would be to add to your code
Code:
Application.DisplayAlerts = False
which suppresses this dialog (and all other alerts).
ben.
 

Banker1

Active Member
Joined
Mar 10, 2005
Messages
463
You could set the file as Read-Only forcing the user to save the file with another name if they make changes. Right click on the file go to Properties. In the General tab towards the bottom there is a Read-Only check box, check it and click ok. Uncheck the box to make the file Read-Write
 

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
781
sweater_vests_rock,

I have tried the "Application.DisplayAlerts = False" method. It does not work for me because it then applies to all exel workbooks.

I like the concept of converting it to an add-in though. Can you share any information on how to accomplish that or where I can learn to do that?
 

sweater_vests_rock

Well-known Member
Joined
Oct 8, 2004
Messages
1,657

ADVERTISEMENT

selkov.

just use the add-ins manager on the vba menubar when you are in VBE. you can also select ThisWorkbook from the Project Window, and in the Properties window below, change Add-In: False to Add-In: True.

this is about all i know :)
ben.
 

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
781
I do not understand the reference to "just use the add-ins manager on the vba menubar when you are in VBE".

I opened excel & went to the add-in manager, navaigated to where the workbook resides, changed add in format type to "all files" and picked the workbook. Did not work. Got error not a vaild add-in.



Does this convert the workbook to an add-in ?
(you can also select ThisWorkbook from the Project Window, and in the Properties window below, change Add-In: False to Add-In: True")[/quote]
 

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
781

ADVERTISEMENT

sweater_vests_rock


I am so close.... Following the second idea :
[you can also select ThisWorkbook from the Project Window, and in the Properties window below, change Add-In: False to Add-In: True]


I found a line entry that read "isAaddin" & set that to true.
I can now load the workbook as a n add-in.
But I can not see the macros from that workbook when i enter {F8}.

Any Ideas?
 

sweater_vests_rock

Well-known Member
Joined
Oct 8, 2004
Messages
1,657
selkov.

that is part of what an add-in does. to run these macros, you need to use a custom toolbar or custom buttons assigned to the macros in the add-in.

i've actually been trying to do an add-in myself, but i cannot get my custom toolbars to load into another user's excel (it loads into mine just fine). i have a feeling that it should be easy (since i can't find any documentation), but i just haven't been able to do it. let me know if you figure it out!

best of luck. ben.
 

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
781
sweater_vests_rock
Try this:

Open a new workbook.
Copy or move to it the macros you want to share.
Create a toolbar & place the Macros on it.
Goto view-toolbars-custimize-attach.
Attach the toolbar to the new workbook.
Save the workbook.

Now every time that workbook is opened by anyone that toolbar will be added to thier workbook. My problem stems from the desire to "CLOSE" the toolbar access once the workbook is closed.

So I thought to find some way just to make the macros availabe wihtout the toolbar. I like where you were going with teh ADD-IN feature only it won't show the macros.

will keep you posted thru this thread if more develpos
 

Watch MrExcel Video

Forum statistics

Threads
1,118,760
Messages
5,574,087
Members
412,566
Latest member
TexasTony
Top