Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so that.

I would like to automate updating of a number of excel spreadsheets. Is
there any way to invoke excel without opening excel or a excel spreadsheet.
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can I invoke excel automatically from .bat or other means so that.

no
-----Original Message-----
I would like to automate updating of a number of excel

spreadsheets. Is
there any way to invoke excel without opening excel or a

excel spreadsheet.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I invoke excel automatically from .bat or other means so that.

hi,
what do you mean by invoke???

-----Original Message-----
I would like to automate updating of a number of excel

spreadsheets. Is
there any way to invoke excel without opening excel or a

excel spreadsheet.
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Can I invoke excel automatically from .bat or other means so that.

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel spreadsheets. Is
there any way to invoke excel without opening excel or a excel spreadsheet.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Can I invoke excel automatically from .bat or other means so t

Just a note that I did not mention. You do need the "". This is the only
difference from invoking Excel from a command prompt. The same as you need ""
for copy or any other function that uses a directory withg blank charachters
in the path...

HTH

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel spreadsheets. Is
there any way to invoke excel without opening excel or a excel spreadsheet.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so that.

I would like to open a specific spreadsheet xxx.xls and process macros in the
spreadsheet without any human intervention.

"booleenbrain" wrote:

hi,
what do you mean by invoke???

-----Original Message-----
I would like to automate updating of a number of excel

spreadsheets. Is
there any way to invoke excel without opening excel or a

excel spreadsheet.
.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so t

Well,

If I wanted to open a specific spreadsheet and execute a macro without
intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel spreadsheets. Is
there any way to invoke excel without opening excel or a excel spreadsheet.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Can I invoke excel automatically from .bat or other means so t


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from running
on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without opening
excel or a excel spreadsheet.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so t

Thanks, I'll Try that.

"keepITcool" wrote:


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from running
on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without opening
excel or a excel spreadsheet.


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so t

keepITcool,

I tried the script and it certainly is closer to what I want but I can't
seem to get the worksheet closed (It stays open and a EXCEL process continues
running) If it try to open the xls file after running the script it says
it's still open..... I tried xlapp.close which didn't fly and it also
disliked the xlapp.visable = true. By the way I'm using Excel 2000. It did,
however, open the spreadsheet and execute what I expected. Closing it up,
without intervention, is the issue now.

"keepITcool" wrote:


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from running
on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without opening
excel or a excel spreadsheet.




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Can I invoke excel automatically from .bat or other means so t

Hi,

I just wanted to point you to the VBScript (which does work properly
with a simple workbook and a few simple macros.)

Try google news on this group : search for "close quit" and
you'll find plenty of advice, though sometimes it can be difficult to
find the culprit. (most likely


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

keepITcool,

I tried the script and it certainly is closer to what I want but I
can't seem to get the worksheet closed (It stays open and a EXCEL
process continues running) If it try to open the xls file after
running the script it says it's still open..... I tried xlapp.close
which didn't fly and it also disliked the xlapp.visable = true. By
the way I'm using Excel 2000. It did, however, open the spreadsheet
and execute what I expected. Closing it up, without intervention, is
the issue now.

"keepITcool" wrote:


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from
running on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without
opening excel or a excel spreadsheet.


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so t

Thanks, I'll look there.

"keepITcool" wrote:

Hi,

I just wanted to point you to the VBScript (which does work properly
with a simple workbook and a few simple macros.)

Try google news on this group : search for "close quit" and
you'll find plenty of advice, though sometimes it can be difficult to
find the culprit. (most likely


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

keepITcool,

I tried the script and it certainly is closer to what I want but I
can't seem to get the worksheet closed (It stays open and a EXCEL
process continues running) If it try to open the xls file after
running the script it says it's still open..... I tried xlapp.close
which didn't fly and it also disliked the xlapp.visable = true. By
the way I'm using Excel 2000. It did, however, open the spreadsheet
and execute what I expected. Closing it up, without intervention, is
the issue now.

"keepITcool" wrote:


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from
running on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without
opening excel or a excel spreadsheet.


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Can I invoke excel automatically from .bat or other means so t



"keepITcool" wrote:

Hi,

I just wanted to point you to the VBScript (which does work properly
with a simple workbook and a few simple macros.)

Try google news on this group : search for "close quit" and
you'll find plenty of advice, though sometimes it can be difficult to
find the culprit. (most likely


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

keepITcool,

I tried the script and it certainly is closer to what I want but I
can't seem to get the worksheet closed (It stays open and a EXCEL
process continues running) If it try to open the xls file after
running the script it says it's still open..... I tried xlapp.close
which didn't fly and it also disliked the xlapp.visable = true. By
the way I'm using Excel 2000. It did, however, open the spreadsheet
and execute what I expected. Closing it up, without intervention, is
the issue now.

"keepITcool" wrote:


Try creating a file with VBS extention.
This VBScript file is basically a latebound VBA file
and coding is almost similar to VBA.

Please note that many administrators will disable VBS files from
running on their networks.



'Code for OpenBook.vbs
Dim xlApp
Dim xlWkb
Const cEXIT = True

Set xlApp = CreateObject("excel.application")
Set xlWkb = xlApp.Workbooks.Open("c:\book.xls")
xlWkb.RunAutoMacros 1 'xlautoopen
xlApp.Run "book.xls!MacroA"
xlApp.Run "book.xls!MacroB"

'now either make Excel visible or close it
If cEXIT Then
xlWkb.Close 0
xlApp.Quit
Set xlWkb = Nothing
Set xlApp = Nothing
Else
xlApp.Visible = True
End If

hope this gives you a leg up. :)





--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam


rmkbrj wrote :

Well,

If I wanted to open a specific spreadsheet and execute a macro
without intervention what else might I do?

"Jim Thomlinson" wrote:

Yup... Place this line in a batch file

"C:\Program Files\Microsoft Office\Office\excel.exe"

You have to assume a standard install of excel though...

HTH

"rmkbrj" wrote:

I would like to automate updating of a number of excel
spreadsheets. Is there any way to invoke excel without
opening excel or a excel spreadsheet.


  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Can I invoke excel automatically from .bat or other means so that.

You can launch excel through a batch file

"C:\Program files\microsoft office\office\excel.exe xcel_filename.xls"
the macro that runs automatically when the file is opened will execute. the
macro must specifically close the file prior to exiting excel.

you would need to have either a excel file with a macro to run all the
updates or run each file from the batch file.
Jerry

"booleenbrain" wrote in message
...
hi,
what do you mean by invoke???

-----Original Message-----
I would like to automate updating of a number of excel

spreadsheets. Is
there any way to invoke excel without opening excel or a

excel spreadsheet.
.



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
How do I invoke a call in Excel DeviceConnect Excel Discussion (Misc queries) 5 February 24th 09 09:34 PM
add data to combo box in excel then invoke macro Richard Excel Worksheet Functions 1 December 11th 05 08:50 PM
Invoke Outlook Express SendMail From Excel VBA Alan Excel Programming 1 February 6th 04 06:27 PM
invoke macro from outside excel - auto macros nongo Excel Programming 2 October 7th 03 02:28 PM
How can I invoke windows environment variable in excel Bert van den Brink Excel Programming 0 August 6th 03 08:46 PM


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