| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a spread sheet I would like to run from a command button. I have several buttons that run word mail merge documents. But I need to run this particular spread sheet because it has all my macros. The code for the word shell is ("WScript.shell"). I need the code for excel. Here is a copy of the code I used.
Public Sub excel_filter_Click() On Error GoTo Err_excel_filter_Click Set Sh = CreateObject("WScript.Shell") Sh.Run "C:\Documents and Settings\RDKIRB49\desktop\filter with macro.xls" Exit_excel_filter_Click: Exit Sub Err_excel_filter_Click: MsgBox Err.Description Resume Exit_excel_filter_Click End Sub As you can see WScript.shell if for word. I need the one for excel. Thanks in advance Reg |
|
#2
|
||||
|
||||
|
I think you can use this:
Set ExShl = CreateObject("Excel.Application") or: Set ExShl = CreateObject("Excel.Sheet") |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Excel Shell |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|