I am a naive user of VBA and I am looking for a VBA macro which would do the following task
- Delete 3 tabs from the file and delete the first 6 rows from remanining tabs.
- Perform this for all the excel files (2013) and save as xlsx in the same or different file folder.
I tried the code available on this link Run same excel macro on multiple excel files
At the line
Filename=Dir(Pathname & "*.xlsx")
, I am getting an error which says run time error "52" Bad file name or number
.
I have changed this:
Pathname = "\C:\Users\Desktop\test\try\"\
Is this correct?