Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default using Application.Run

if the xls file xxx is open and I try the following then Bob's your
Uncle the code runs fine:

Sub runMe()
Application.Run "xxx.xls!xxx"
End Sub

if the xls file is closed and I run the following:

Sub runMe()
Application.Run "'C:\Documents and Settings\xxx.xls!xxx"
End Sub

.....the target file xxx opens but it then errors out before running
the macro

Anbody know why this happens

Any help appreciated
JasonQ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default using Application.Run

The workbook has to be open.

WhytheQ wrote:

if the xls file xxx is open and I try the following then Bob's your
Uncle the code runs fine:

Sub runMe()
Application.Run "xxx.xls!xxx"
End Sub

if the xls file is closed and I run the following:

Sub runMe()
Application.Run "'C:\Documents and Settings\xxx.xls!xxx"
End Sub

....the target file xxx opens but it then errors out before running
the macro

Anbody know why this happens

Any help appreciated
JasonQ


--

Dave Peterson
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
Execute a Macro from one excel Application to another Application Jason Zischke Excel Programming 2 January 30th 08 11:45 AM
difference application.quit & application.close Pierre via OfficeKB.com[_2_] Excel Programming 4 November 8th 05 07:55 PM
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM


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