in this example let say u 1 2 open sheet3 everytime u open
your wb :
sub auto_open()
sheets("sheet3").select
end sub
hth
Build a navagation workbook. Put form buttons on the sheet. When you press a button the code opens and selects the sheet of interest. Like a menu. you can also build short macros which open a workbook, Like:
Workbooks.Open "myList.xls"
ActiveWorkbook.RunAutoMacros xlAutoOpen
and
within the workbook add:
Private Sub Workbook_Open()
Worksheets("X").Select
End Sub
You can nest workbooks on open with a set of:
Workbooks("XXX.xls").Activate
statements.
If you want to select from another application, like "Word" you can:
Set xl = CreateObject("Excel.Sheet")
xl.Application.Workbooks.Open "XXX.xls"
If Excel is not loaded you can load it with,
' You can also use the return value of the Shell function.
ReturnValue = Shell("c:\EXCEL\EXCEL.exe",1) ' Run the Microsoft Excel application.
AppActivate ReturnValue ' Activate Microsoft
' Excel.
If you want to start multiple incidences of Excel, use:
Application.ActivateMicrosoftApp xlMicrosoftExcel
If you are not running Windows2000 or NT you can call batch files with the "Shell" function. Which may also offer some options at startup?
Dim RetVal
RetVal = Shell("C:\BATS\myBat.bat", 1)
What you asked for can be done, you just need to decide how you what to do it, sa command line options are limited, you may need another system, one based upon the ideas above. As a side note you could use "C" or regular "VB" to write a interface, but a worksheet menu system will work just the sane. JSW
: This has got to be simple as dirt but I haven't found anyone that can give me the command line parameters to open a specific worksheet within a workbook.
It don't work another applications", such as msWord. I don't understand where you find property
xlMicrosoftExcel !!!!!
I need to connect to active document ms Excel from Delphy application.