Shared Workbook - macro

Mel L

Board Regular
Joined
Oct 14, 2004
Messages
50
I have a macro that saves data from one sheet to a shared workbook. Everything works great, but I get a pop up letting me know it's a shared workbook, etc and requires that I hit save. I want to add to my macro to automatically hit this save, so the user doesn't have to. Is there a simple piece of code I can add to my code to accomplish this?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
How will that work? I do want it to save. I already have code to save it. I want the code to override the message box that pops up when you save a shared workbook.

Caution: You are attempting to save a shared workbook that is also protected with a password. Portions of the file, including the change history, will not be encrypted. To help ensure the security of your file, unshare the workbook or delete the change history from you document. Do you want to save this file?

You then have the option of hitting save or cancel. I want it to save.
 
Upvote 0
Try

Code:
Application.DisplayAlerts = False

before the save then set it to True afterwards.
 
Upvote 0
the flase part after activeworkbook.save should do the same thing.

activeworkbook.save false


does that not work for this?
 
Upvote 0
VoG II,
Perfect thanks.

QuietRiot,
I couldn't get it to work.

Thanks for all the help. It is greatly appreciated. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,369
Members
449,080
Latest member
Armadillos

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