March 3, 2020
i have sheet1 and sheet2 (sheet 2 i renamed it as sheet_report).
i have some data coming to sheet2 from other work book when i run a macro. it was working fine but i have a issue. when some deletes the sheet2(sheet_report) and recreates it ,it is creating as sheet3 and when sheet3 is deleted the new one created is sheet4.so my macro couldn't find the sheet2 to fill the data.
is there any way we can do any thing that when sheet2 is deleted and and when i create a new sheet the sheet name should be again sheet2.
Can any one please help on this!
Thanks in Advance
October 5, 2010
Hi MM.
Excel uses its own internal names for the sheets e.g. Sheet1, Sheet2. If you change the names on the sheet tabs in your workbook, these internal names stay the same.
So, just refer to the sheet by the name you use for it on the sheet tab e.g.
Worksheets("sheet_report").Activate
Regards
Phil
1 Guest(s)