S
Sheela
I am new to programming. This site has been very helpful for me. I am
learning as I am working.
I would need to write a macro to name columns based on the sheet name.
This code will run through all the sheets in the workbook and fill the first
row, based on the sheet name.
If sheetname name is “name1†then column names are ( “Col1â€, “Col2â€, “Col3â€)
( these will be written in the first row)
Else if sheetname is “name2†then column names are (“some1†“some2â€)
Could someone please give me a sample template of code. I am thinking of
select case statement. But do not know how to write this in VBA code.
Thank you very much for you help in advance
sheela
learning as I am working.
I would need to write a macro to name columns based on the sheet name.
This code will run through all the sheets in the workbook and fill the first
row, based on the sheet name.
If sheetname name is “name1†then column names are ( “Col1â€, “Col2â€, “Col3â€)
( these will be written in the first row)
Else if sheetname is “name2†then column names are (“some1†“some2â€)
Could someone please give me a sample template of code. I am thinking of
select case statement. But do not know how to write this in VBA code.
Thank you very much for you help in advance
sheela