Free for PREMIUM members
Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium
Dim strFileSelected As String
Dim objOfficeDialog As Object
Dim wbDestination As Workbook
Dim wbSource As Workbook
Dim sh As Worksheet
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
Set objOfficeDialog = Application.FileDialog(msoFileDialogFilePicker)
Set wbDestination = ActiveWorkbook
.Title = "Select the Project Cost Allocation file"
.AllowMultiSelect = False
If .Show <> -1 Then
strFileSelected = .SelectedItems(1)
Dim strSuffix As String
If strFileSelected <> "" Then
strSuffix = InputBox("Please enter text to append to tab names")
Set wbSource = Workbooks.Open(strFileSelected)
For Each sh In wbSource.Sheets
wbDestination.Worksheets(wbDestination.Worksheets.Count).Name = sh.Name & " " & strSuffix
Selection.OnAction = "ReturnMenu"
' wbSource.Close False
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.ScreenUpdating = True
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
If Yearly < "2014" Or Yearly > "2050" Then
MsgBox "Invalid Year please try again"
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.