ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open a specific sheet with VBA (https://www.excelbanter.com/excel-programming/400416-open-specific-sheet-vba.html)

joel

Open a specific sheet with VBA
 
Hi I was wondering what the VBA code was for opening a specific sheet in
another unopen workbook.

For example from one workbook I want to open sheet6 on another one

my code is beneath

Workbooks.Open "\\Kerrygriffit-pc\external\Other\Money\New Going out Sheet
V2.xls\february"

Thanks Joel


--
N/A

JE McGimpsey

Open a specific sheet with VBA
 
One way:


Workbooks.Open "\\Kerrygriffit-pc\external\Other\Money\New Going out
Sheet V2.xls\february"
ActiveWorkbook.Sheets("Sheet6").Activate


In article ,
Joel wrote:

Hi I was wondering what the VBA code was for opening a specific sheet in
another unopen workbook.

For example from one workbook I want to open sheet6 on another one

my code is beneath

Workbooks.Open "\\Kerrygriffit-pc\external\Other\Money\New Going out Sheet
V2.xls\february"

Thanks Joel


Gary''s Student

Open a specific sheet with VBA
 
After your Workbooks.Open insert:
Sheets("sheet6").Activate
--
Gary''s Student - gsnu200753


"Joel" wrote:

Hi I was wondering what the VBA code was for opening a specific sheet in
another unopen workbook.

For example from one workbook I want to open sheet6 on another one

my code is beneath

Workbooks.Open "\\Kerrygriffit-pc\external\Other\Money\New Going out Sheet
V2.xls\february"

Thanks Joel


--
N/A



All times are GMT +1. The time now is 01:19 PM.

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