saving backups vb

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Saving, backups, VB

Saving, backups, VB

resolvedResolved · Low Priority · Version 2003

Shani has attended:
Excel VBA Intro Intermediate course

Saving, backups, VB

Hi Carlos,

Is there a command to get Excel to save a copy of a workbook elsewhere, without then switching to having the new one open? I want to be able to send backups/copies to another directory, but still be editing the original file.

Thanks,
Shani

Edited on Tue 17 Jun 2008, 09:29

RE: Saving, backups, VB

Hi Shani

If you wish to save a copy of the workbook you are working on do the following:

Sub SaveBkUp()

Dim BkUpFileName As String

BkUpFileName = BkUpFileName = "C:\My Documents\BackUps\......"

'Either have the name and path of the backup hadcoded into the code (as Above) or use a input box to enter it

If BkUpFileName = "" Then Exit Sub

ThisWorkbook.SaveAs BkUpFileName

End Sub


Hope this helps

Carlos

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Change Excel's default font

You can change the default font and font size for all spreadsheets created in Excel by:

1. Going to Tools on the menu bar.
2. Select Options, then General.
3. Next to Standard Font you can change the font and font size.
4. Click OK.

Each new file you start from this point onward should use the font and font size you have selected.

View all Excel hints and tips


Server loaded in 0.08 secs.