saving workbook with a macro

merlin777

Well-known Member
Joined
Aug 29, 2009
Messages
1,397
Office Version
  1. 2007
I want to save my workbook with a macro i can put on a button.

I'm writing the workbook in 2007 but it will be used by several novice users who have 2010 and i want to make saving easy and consistent for them.

I am constructing the full path and filename on one of the sheets thus:

A1: full path to folder on the users' network
A2: generic part of filename e.g. 'weekly diary'
A3: dynamic part of filename (the date for monday of the current week)
A4: file extension ( will be .xlsm to preserve macros
A5: full path and filename from concatenating the above e.g. 'C:\users\john\diaries/weeklydiary220914.xlsm'

this will cause diaries to auto-archive for previous weeks by using a new filename each week.

Please can anyone suggest macro code to do this? I assume it goes into a workbook module so it can be run from a button on any sheet?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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