ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Backup to specific folder if workbook names begins with "NSR" or "MAC" (https://www.excelbanter.com/excel-programming/328777-backup-specific-folder-if-workbook-names-begins-nsr-mac.html)

GregR

Backup to specific folder if workbook names begins with "NSR" or "MAC"
 
How do I specify that I want to backup to a specific folder if the
workbook name begins with NSR or MAC, else just backup to the regular
backup folder, "BU". TIA

Greg


GregR

Backup to specific folder if workbook names begins with "NSR" or "MAC"
 
My code is failing on this line

If (Left(BK.Name, 3)) = "NSR" Or "MAC" Then

When the line is:

If (Left(BK.Name, 3)) = "NSR"

it works as intended. TIA

Greg


Tom Ogilvy

Backup to specific folder if workbook names begins with "NSR" or "MAC"
 
If (Left(BK.Name, 3)) = "NSR" Or (Left(bk.name,3) = "MAC") Then

--
Regards,
Tom Ogilvy

"GregR" wrote in message
oups.com...
My code is failing on this line

If (Left(BK.Name, 3)) = "NSR" Or "MAC" Then

When the line is:

If (Left(BK.Name, 3)) = "NSR"

it works as intended. TIA

Greg




GregR

Backup to specific folder if workbook names begins with "NSR" or "MAC"
 
Thanks again Tom

Greg



All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com