VBA for Copying Tabs to another file location that's already saved.

Status
Not open for further replies.

aspinray

New Member
Joined
Jan 14, 2016
Messages
16
Hi,

I was wondering if someone can help?

I have a spreadsheet "Holiday Planners" in that I have several tabs of areas "Enhance, Prepay, Appointments". Each of these have a calendar with slots that are available on that day.

This is the main spreadsheet that I update each time some books a holiday. However, I want to copy these tabs to another spreadsheet to another location for staff to view that is protected and read only.

I have used -

Private Sub Workbook_BeforeSave(ByVal _
SaveAsUI As Boolean, Cancel As Boolean)

With ThisWorkbook
.SaveCopyAs ("file path -" Copy of " & .Name)
End With
End Sub


previously for something else i have used. However this is a direct duplicate and copies the file.

I would prefer that on saving the master holiday planner it copies each tab and pastes it into the read only file that staff see, this is so i can hide certain rows.

However, if you have any ideas it will be greatly appreciated.

thank you! :)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Re-posted here: Code to save more than one sheet.

In the future, please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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