Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default open file, then call macro... won't work


The following code won't work right:

Sub openthenrun()
Workbooks.Ope
Filename:="C:\Kieran\Posturedata1\posturetemplate. xls"
Application.Run "PERSONAL.XLS!IMPORT"
End Sub

If I try to run this, it stops after opening the first file, and wil
not continue on to run the "IMPORT" macro.

I also tried placing the open filename line above into the code for th
"IMPORT" macro, and the same thing happened.

Any hints? Thanks...
-Kiera

--
Kieran102
-----------------------------------------------------------------------
Kieran1028's Profile: http://www.excelforum.com/member.php...fo&userid=1567
View this thread: http://www.excelforum.com/showthread.php?threadid=27709

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default open file, then call macro... won't work

Are you using a shortcut key to fire Openthenrun? If so, does the shortcut
include the shift key. If so, then use a shortcut key combination that does
not include the shift key.

--
Regards,
Tom Ogilvy

"Kieran1028" wrote in message
...

The following code won't work right:

Sub openthenrun()
Workbooks.Open
Filename:="C:\Kieran\Posturedata1\posturetemplate. xls"
Application.Run "PERSONAL.XLS!IMPORT"
End Sub

If I try to run this, it stops after opening the first file, and will
not continue on to run the "IMPORT" macro.

I also tried placing the open filename line above into the code for the
"IMPORT" macro, and the same thing happened.

Any hints? Thanks...
-Kieran


--
Kieran1028
------------------------------------------------------------------------
Kieran1028's Profile:

http://www.excelforum.com/member.php...o&userid=15678
View this thread: http://www.excelforum.com/showthread...hreadid=277098



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default open file, then call macro... won't work

I am having the same problem: VBA in Excel just quits with no error after
running workbooks.open. There is no shortcut key involved. Any ideas?

"Tom Ogilvy" wrote:

Are you using a shortcut key to fire Openthenrun? If so, does the shortcut
include the shift key. If so, then use a shortcut key combination that does
not include the shift key.

--
Regards,
Tom Ogilvy

"Kieran1028" wrote in message
...

The following code won't work right:

Sub openthenrun()
Workbooks.Open
Filename:="C:\Kieran\Posturedata1\posturetemplate. xls"
Application.Run "PERSONAL.XLS!IMPORT"
End Sub

If I try to run this, it stops after opening the first file, and will
not continue on to run the "IMPORT" macro.

I also tried placing the open filename line above into the code for the
"IMPORT" macro, and the same thing happened.

Any hints? Thanks...
-Kieran


--
Kieran1028
------------------------------------------------------------------------
Kieran1028's Profile:

http://www.excelforum.com/member.php...o&userid=15678
View this thread: http://www.excelforum.com/showthread...hreadid=277098




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default open file, then call macro... won't work

Do you have
On Error Resume Next

in your code. Perhaps it is hitting an error that causes it to quit.

This used to be a prevalent problem in xl97 when users had troublesome UDF's
in the worksheet.

--
Regards,
Tom Ogilvy

"Pvanderploeg" wrote in message
...
I am having the same problem: VBA in Excel just quits with no error after
running workbooks.open. There is no shortcut key involved. Any ideas?

"Tom Ogilvy" wrote:

Are you using a shortcut key to fire Openthenrun? If so, does the

shortcut
include the shift key. If so, then use a shortcut key combination that

does
not include the shift key.

--
Regards,
Tom Ogilvy

"Kieran1028" wrote in message
...

The following code won't work right:

Sub openthenrun()
Workbooks.Open
Filename:="C:\Kieran\Posturedata1\posturetemplate. xls"
Application.Run "PERSONAL.XLS!IMPORT"
End Sub

If I try to run this, it stops after opening the first file, and will
not continue on to run the "IMPORT" macro.

I also tried placing the open filename line above into the code for

the
"IMPORT" macro, and the same thing happened.

Any hints? Thanks...
-Kieran


--
Kieran1028


------------------------------------------------------------------------
Kieran1028's Profile:

http://www.excelforum.com/member.php...o&userid=15678
View this thread:

http://www.excelforum.com/showthread...hreadid=277098






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
Button fails to call macro when open an Excel via Intranet tigertax Excel Discussion (Misc queries) 1 April 12th 05 10:21 AM
Button fails to call macro when open an Excel file from web Sam Excel Programming 1 June 30th 04 10:42 PM
How to call File Open / Save Window in a Macro [email protected] Excel Programming 1 January 28th 04 03:46 PM
Open Another Workbook and Call Macro Bill Oertell[_2_] Excel Programming 1 January 20th 04 04:29 AM
Auto_Open vs Open and call macro --priority question John Baker Excel Programming 3 December 7th 03 04:26 PM


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