![]() |
Automatic naming Worksheet tabs
Hi All, Here is a curly one....I have the automatic worksheets being renamed by a vba code. The problem I'm having is there is a macro button to hide and unhide these same sheets. Once the names have been changed, the sheets won't open for THAT exact reason, the macro can no longer find the sheet names. Is there any way around this so I can have my cake AND eat it too???? Thanx Sandi -- rhani111 ------------------------------------------------------------------------ rhani111's Profile: http://www.excelforum.com/member.php...o&userid=19940 View this thread: http://www.excelforum.com/showthread...hreadid=555491 |
Automatic naming Worksheet tabs
If you keep the sheets always in the same order from left to right, you can
use this: Sheets(1).activate ' the first sheet on the left Sheets(4).activate ' the fourth from the left It works for any sheet that is visible at the time. If you have hidden sheets, it would be a good idea to have them at the right end when visible so the sheet counting will remain accurate. Best wishes, Jim "rhani111" wrote: Hi All, Here is a curly one....I have the automatic worksheets being renamed by a vba code. The problem I'm having is there is a macro button to hide and unhide these same sheets. Once the names have been changed, the sheets won't open for THAT exact reason, the macro can no longer find the sheet names. Is there any way around this so I can have my cake AND eat it too???? Thanx Sandi -- rhani111 ------------------------------------------------------------------------ rhani111's Profile: http://www.excelforum.com/member.php...o&userid=19940 View this thread: http://www.excelforum.com/showthread...hreadid=555491 |
Automatic naming Worksheet tabs
I should have added that, knowing the number order of the hidden sheet you
can have: Sheets(5).visible = True and the fifth sheet (hidden at present) will become visible. Sheets(7).visible = false ' will hide the seventh visible sheet from left. Jim "rhani111" wrote: Hi All, Here is a curly one....I have the automatic worksheets being renamed by a vba code. The problem I'm having is there is a macro button to hide and unhide these same sheets. Once the names have been changed, the sheets won't open for THAT exact reason, the macro can no longer find the sheet names. Is there any way around this so I can have my cake AND eat it too???? Thanx Sandi -- rhani111 ------------------------------------------------------------------------ rhani111's Profile: http://www.excelforum.com/member.php...o&userid=19940 View this thread: http://www.excelforum.com/showthread...hreadid=555491 |
All times are GMT +1. The time now is 05:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com