Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
vertblancrouge
 
Posts: n/a
Default How do I open a specific worksheet using windows exp...

We use a home software at work to manage our shop maintenance actions and
sometimes, we attach an excel workbook to compile data. We can also print the
Excel workbook automatically when we print the desired maintenance action. It
then prints the workbook in it's last configuration (most of the time, the
wrong worksheet).

I want to add a command to the link in the home software so that the Excel
workbook always opens on the correct worksheet. The links in the home
software act exactly the same as if you type an address in windows explorer.

More precisely I want to open the worksheet "Data" when opening this link:
H:\Maintenance\Maintenance\MP2 attachment\gearpump bearings lub.xls

If this is not possible, can I configure this particular workbook to always
open on the desired worksheet?

We use Excel 2003 and Windows XP.

Thank you very much.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi

You can use this event in the Thisworkbook module of that workbook

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Data").Select
End Sub

See this site also
http://www.cpearson.com/excel/events.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"vertblancrouge" wrote in message
...
We use a home software at work to manage our shop maintenance actions and
sometimes, we attach an excel workbook to compile data. We can also print the
Excel workbook automatically when we print the desired maintenance action. It
then prints the workbook in it's last configuration (most of the time, the
wrong worksheet).

I want to add a command to the link in the home software so that the Excel
workbook always opens on the correct worksheet. The links in the home
software act exactly the same as if you type an address in windows explorer.

More precisely I want to open the worksheet "Data" when opening this link:
H:\Maintenance\Maintenance\MP2 attachment\gearpump bearings lub.xls

If this is not possible, can I configure this particular workbook to always
open on the desired worksheet?

We use Excel 2003 and Windows XP.

Thank you very much.



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you open your "gearpump bearings lub.xls", you could select the worksheet in
code:

option explicit
sub auto_open
application.goto worksheets("sheet1").range("a1"),scroll:=true
end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

vertblancrouge wrote:

We use a home software at work to manage our shop maintenance actions and
sometimes, we attach an excel workbook to compile data. We can also print the
Excel workbook automatically when we print the desired maintenance action. It
then prints the workbook in it's last configuration (most of the time, the
wrong worksheet).

I want to add a command to the link in the home software so that the Excel
workbook always opens on the correct worksheet. The links in the home
software act exactly the same as if you type an address in windows explorer.

More precisely I want to open the worksheet "Data" when opening this link:
H:\Maintenance\Maintenance\MP2 attachment\gearpump bearings lub.xls

If this is not possible, can I configure this particular workbook to always
open on the desired worksheet?

We use Excel 2003 and Windows XP.

Thank you very much.


--

Dave Peterson
  #4   Report Post  
vertblancrouge
 
Posts: n/a
Default

I found it more efficient to add a event when I open de workbook:

Private Sub Workbook_Open()
Sheets("Data").Select
End Sub


The event you proposed me was a little annoying. When I was working on a
worksheet different then the Data one, it would switch to that one every time
I saved. I still want to say thanks for making me discover the events in
excel. It sure gonna help!
  #5   Report Post  
vertblancrouge
 
Posts: n/a
Default

I also find out that I can write the linki as:

gear pump bearings.xls#Data!A1
"Data" being the worksheet I want to open. I have to specify a cell
otherwise the link doesn't work.

"vertblancrouge" wrote:

We use a home software at work to manage our shop maintenance actions and
sometimes, we attach an excel workbook to compile data. We can also print the
Excel workbook automatically when we print the desired maintenance action. It
then prints the workbook in it's last configuration (most of the time, the
wrong worksheet).

I want to add a command to the link in the home software so that the Excel
workbook always opens on the correct worksheet. The links in the home
software act exactly the same as if you type an address in windows explorer.

More precisely I want to open the worksheet "Data" when opening this link:
H:\Maintenance\Maintenance\MP2 attachment\gearpump bearings lub.xls

If this is not possible, can I configure this particular workbook to always
open on the desired worksheet?

We use Excel 2003 and Windows XP.

Thank you very much.

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 two excel windows side by side Dave Berry Excel Discussion (Misc queries) 5 May 4th 05 09:01 PM
How do I open to a specific worksheet every time? TNT New Users to Excel 2 February 6th 05 12:06 PM
How to open a workbook with a specific worksheet displayed by defa ThaiNB New Users to Excel 2 January 21st 05 06:11 AM
how to open in windows a macintosh excel file macmai Excel Discussion (Misc queries) 6 January 8th 05 12:44 PM
How do I get my personal macro worksheet to open whenever I open . Claudia_R Excel Discussion (Misc queries) 3 December 9th 04 11:59 PM


All times are GMT +1. The time now is 07:12 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"