Select last worksheet in workbook
Hello all,
Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
Define last. The right most tab? The last sheet created? ...?
-- HTH... Jim Thomlinson "TimT" wrote: Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
Tim,
Try something like With ThisWorkbook.Worksheets .Item(.Count).Select End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "TimT" wrote in message ... Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
The right most tab.
"Jim Thomlinson" wrote: Define last. The right most tab? The last sheet created? ...? -- HTH... Jim Thomlinson "TimT" wrote: Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
Chips code will do it for you...
-- HTH... Jim Thomlinson "TimT" wrote: The right most tab. "Jim Thomlinson" wrote: Define last. The right most tab? The last sheet created? ...? -- HTH... Jim Thomlinson "TimT" wrote: Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
Chip thanks,
So if I wanted to find the last tab (furthest to the right) and reference that sheet in the following line of code: Sheets("LastTab").Name = "Tmp_PartnerContact" ....so I can change it, how would that be referenced? "Chip Pearson" wrote: Tim, Try something like With ThisWorkbook.Worksheets .Item(.Count).Select End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "TimT" wrote in message ... Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
Select last worksheet in workbook
Sheets("LastTab").Name = "Tmp_PartnerContact"
Sheets(Sheets.count).Name = "Tmp_PartnerContact" -- Regards, Tom Ogilvy "TimT" wrote in message ... Chip thanks, So if I wanted to find the last tab (furthest to the right) and reference that sheet in the following line of code: Sheets("LastTab").Name = "Tmp_PartnerContact" ...so I can change it, how would that be referenced? "Chip Pearson" wrote: Tim, Try something like With ThisWorkbook.Worksheets .Item(.Count).Select End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "TimT" wrote in message ... Hello all, Is there a way to simply select the last worksheet in a workbook regardless of its name? |
All times are GMT +1. The time now is 04:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com