Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Macro to open a file

Hi,
I have in 2 different macro the exactly same program to open a file. But in the first one, it is working and in the second one, the program stop after have opened the file.... He just stop as if there is an exit sub after my row.... In the exemple behind, the program does not do the 3rd line.... I am completly lost....
Thanks for any help

Public Sub openfillratio()

ChDir "H:\Charras"
Workbooks.Open Filename:="H:\Charras\Fill Ratio.xls"
Windows("temporaire.xls").Activate

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to open a file

Are you using a shortcut key to start either of the macros? Is so, does the
shortcut key include the shift key as part of the shortcut combination. If
so, change it so it doesn't require the shift key.

--
Regards,
Tom Ogilvy

"ben.c" wrote in message
...
Hi,
I have in 2 different macro the exactly same program to open a file. But

in the first one, it is working and in the second one, the program stop
after have opened the file.... He just stop as if there is an exit sub after
my row.... In the exemple behind, the program does not do the 3rd line.... I
am completly lost....
Thanks for any help

Public Sub openfillratio()

ChDir "H:\Charras"
Workbooks.Open Filename:="H:\Charras\Fill Ratio.xls"
Windows("temporaire.xls").Activate

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Macro to open a file

Yes, Yes, and Yes....it is working without the shift key in the short cut...
Do you know why the shift key does this ?
Thanks a lot for the answer, I was really disapointed.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to open a file

When you hold down the shift key and open a file manually, it disables
macros. Apparently it has the same effect when you use a shortcut key that
includes a shift to fire the macro. When the workbook opens, the macro is
halted.

--
Regards,
Tom Ogilvy

"ben.c" wrote in message
...
Yes, Yes, and Yes....it is working without the shift key in the short

cut...
Do you know why the shift key does this ?
Thanks a lot for the answer, I was really disapointed.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Macro to open a file

Thanks agai

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
Open Excel file from VB and open MACRO no1jimmyman Excel Discussion (Misc queries) 0 February 14th 11 10:10 PM
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
Macro to run on file open Marie Bayes Excel Discussion (Misc queries) 17 November 5th 08 07:47 PM
Open File within a macro Rob Excel Discussion (Misc queries) 10 June 29th 06 08:55 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"