I'm fairly new to VBA but been working on some code that basically saves each worksheet as its own workbook into a designated folder / path.
This works fine however i have to manually enter the destination for the files to be saved.
What i want is a pop up box to be able to browse through folders etc and select the detination.
But i'm stumpt
Here is the code below i'm using
Thank you
This works fine however i have to manually enter the destination for the files to be saved.
What i want is a pop up box to be able to browse through folders etc and select the detination.
But i'm stumpt
Here is the code below i'm using
Thank you
Rich (BB code):
Sub Savepertab()
'Creates an individual workbook for each worksheet in the active workbook.
Dim wbDest As Workbook
Dim wbSource As Workbook
Dim sht As Object 'Could be chart, worksheet, Excel 4.0 macro,etc.
Dim strSavePath As String
On Error GoTo ErrorHandler
Application.ScreenUpdating = False 'Don't show any screen movement
'Destination Folder Need to create a browse options
strSavePath = "Manually entered Path"
Set wbSource = ActiveWorkbook
For Each sht In wbSource.Sheets
sht.Copy
Set wbDest = ActiveWorkbook
wbDest.SaveAs strSavePath & sht.Name
wbDest.Close 'Remove this if you don't want each book closed after saving.
Next
Application.ScreenUpdating = True