View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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