Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open workbook to specific sheet Mr E[_2_] Excel Worksheet Functions 1 April 9th 10 06:53 PM
How do I open a workbook in a specific sheet PetterSn Excel Discussion (Misc queries) 3 January 12th 06 06:44 AM
Open Specific Sheet in Workbook jhahes[_9_] Excel Programming 1 June 24th 05 09:26 PM
Go to a specific sheet on open Andy Josolyne[_2_] Excel Programming 1 March 2nd 05 12:31 PM
Auto Open Excel at Specific Sheet John[_41_] Excel Programming 0 August 1st 03 04:42 PM


All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"