autoclose without saving.

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
787
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?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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.
 
Upvote 0
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
 
Upvote 0
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?
 
Upvote 0
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.
 
Upvote 0
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]
 
Upvote 0
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?
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top