Andreas Hermle
asked on
Insert first row in multiple excel files in given folder
Dear Experts:
I would like to run a macro that performs the following action:
I got hundreds of xlsm-files in C:\temp\
- I would like to insert a row at the very top of each workbook (each workbook contains just one worksheet named 'temp').
- This newly created first row has to have the following entries for A1, B1, C1, D1:
Item Number, Customer, Street, Items.
- The first row should be formatted to repeat with each page break (rows to repeat at top)
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
I would like to run a macro that performs the following action:
I got hundreds of xlsm-files in C:\temp\
- I would like to insert a row at the very top of each workbook (each workbook contains just one worksheet named 'temp').
- This newly created first row has to have the following entries for A1, B1, C1, D1:
Item Number, Customer, Street, Items.
- The first row should be formatted to repeat with each page break (rows to repeat at top)
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you very much for your great help. Works great although I needed to make a slight change on the variable declaration:
Dim wb As Variant
And I added
wb.ActiveSheet.PageSetup.P
Anyhow, thank you very much for your great and swift support. I really appreciate it.
Regards, Andreas