View Single Post
  #2   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

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