![]() |
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. |
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. |
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 |
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! |
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. |
All times are GMT +1. The time now is 06:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com