I want to save activated worksheet at given folder path and want to save in tab with specific worksheet name using VBA macro

Viewed 29

I want to save activated worksheet at given folder path and want to save in tab with specific worksheet name using VBA macro and want to delete activated worksheet again.as i am doing this for number of files and also i want to add wrap text =true and row height set 12.75 Tried below code

Set wb  = Workbook.Add
Activeworkbook.SaveAs Filename : "G:\expected file name.xls",FileFormat:=xlOpenXMLWorkbook
ThisWorkbook.Sheets("template").Activate
ThisWorkbook.Sheets(Array(template")).Move Before:=Workbooks("template").Sheets(1)
Sheets(2).Delete
ActiveWorkbook.Save
Windows(Foldername to save)

Here my requirement is i want save activated worksheet which is template ,i want to save this template at "G:/folder1" with filename XYZ.xls and with tab name 'Region1'

and also want to print date from last monday to last sunday date in Cell B5 with format YYYYMMDD

0 Answers
Related