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.

Mel L

Board Regular
Joined
Oct 14, 2004
Messages
50
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.
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

Code:
Application.DisplayAlerts = False

before the save then set it to True afterwards.
 

QuietRiot

Well-known Member
Joined
May 18, 2007
Messages
1,077
the flase part after activeworkbook.save should do the same thing.

activeworkbook.save false


does that not work for this?
 

Mel L

Board Regular
Joined
Oct 14, 2004
Messages
50
VoG II,
Perfect thanks.

QuietRiot,
I couldn't get it to work.

Thanks for all the help. It is greatly appreciated. :biggrin:
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,682
Messages
5,838,787
Members
430,568
Latest member
bortey

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
Top