Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can you specify a worksheet during file open in excel?

Looking for a way to output to multiple sheets when creating an excel file
from a program. Is there some command-line switch or other feature one can
use to specifiy which worksheet to open or write to when an excel file is
openned?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default can you specify a worksheet during file open in excel?

You can use the Workbook_Open event to specify which worksheet is active upon
opening.

Private Sub Workbook_Open()
Worksheets("Sheet3").Activate
End Sub

The above code snippet would go in the ThisWorkbook code module. To access
that code module, press Alt + F11. Either double click on ThisWorkbook in
the project window in the left panel of the screen, or right click on it and
then click on View Code from the drop down menu. If you put the above code
in that code module, it will bring up sheet 3 each time you open the workbook.

"Tim_at_TDR" wrote:

Looking for a way to output to multiple sheets when creating an excel file
from a program. Is there some command-line switch or other feature one can
use to specifiy which worksheet to open or write to when an excel file is
openned?

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 excel file and reffer to specific worksheet Arne Hegefors Excel Programming 1 November 9th 07 10:41 AM
Is there a way to open an excel file to a specific worksheet? Nicholas Excel Discussion (Misc queries) 1 December 5th 06 10:29 PM
Any way to open an excel file directly to a worksheet? skiddyrow Excel Discussion (Misc queries) 2 July 12th 05 01:39 PM
I need Code to open DBF file in an excel worksheet Jason Ward Excel Programming 3 April 29th 05 07:09 PM
From HTML open a specific worksheet within a excel file esoller Excel Programming 2 May 18th 04 09:41 PM


All times are GMT +1. The time now is 09:11 AM.

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

About Us

"It's about Microsoft Excel"