ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to open a specific worksheet via code from workbook_open (https://www.excelbanter.com/excel-programming/441505-how-open-specific-worksheet-via-code-workbook_open.html)

Martin Parker[_2_]

How to open a specific worksheet via code from workbook_open
 
I have a combobox which is populated with all the worksheets within the
workbook. The controlsource of the combobox is linked to a cell on a
worksheet.

My question is how do i make the Excel workbook open at the worksheet which
is detailed within the combobox linked cell.

I've been previously using in the Workbook_Open procedu-

Worksheets("Sheet1").activate but how do i incorporate the linked cell
reference to open the worksheet the user has chosen via the combobox.

Hope you can help!

Cheers

Martin Parker[_2_]

How to open a specific worksheet via code from workbook_open
 


"Martin Parker" wrote:

I have a combobox which is populated with all the worksheets within the
workbook. The controlsource of the combobox is linked to a cell on a
worksheet.

My question is how do i make the Excel workbook open at the worksheet which
is detailed within the combobox linked cell.

I've been previously using in the Workbook_Open procedu-

Worksheets("Sheet1").activate but how do i incorporate the linked cell
reference to open the worksheet the user has chosen via the combobox.

Hope you can help!

Cheers


managed to solved this one myself!!

Worksheets(Worksheets("sheet1").Range("c5").Value) .Activate

Is this the best way of doing this??


All times are GMT +1. The time now is 07:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com