Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default macro stop before end if I use a shortcut ?

Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default macro stop before end if I use a shortcut ?

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default macro stop before end if I use a shortcut ?

thanks, it works without using the shift key. There are a lot of people which
will use my macro and want something different than just [Ctrl] + [letter].
Can I use something else ?

"Tom Ogilvy" wrote:

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default macro stop before end if I use a shortcut ?

I don't think so.

Perhaps look at ONKEY in VBA help.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in message
...
thanks, it works without using the shift key. There are a lot of people

which
will use my macro and want something different than just [Ctrl] +

[letter].
Can I use something else ?

"Tom Ogilvy" wrote:

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in

message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default macro stop before end if I use a shortcut ?

Tom how do you know these things? One question... Is there a way around this
setting the

application.onkey

Wondering if you know...

"Tom Ogilvy" wrote:

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default macro stop before end if I use a shortcut ?

I doubt that setting the same combination in OnKey would make a difference -
the problem is that holding down the shift key when opening a workbook
suppresses the Auto_Open and Workbook_Open macros, so holding it down for
the shortcut key combination has the same effect. OnKey wouldn't change
that.

--
Regards,
Tom Ogilvy


"Jim Thomlinson" wrote in message
...
Tom how do you know these things? One question... Is there a way around

this
setting the

application.onkey

Wondering if you know...

"Tom Ogilvy" wrote:

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in

message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default macro stop before end if I use a shortcut ?

You are undoubtedly right but I never thought of that. I use the shift key
all the time in Access to keep maros from executing on start up. I will have
to try the onkey thing some time just to confirm.

Thanks for the reply...

"Tom Ogilvy" wrote:

I doubt that setting the same combination in OnKey would make a difference -
the problem is that holding down the shift key when opening a workbook
suppresses the Auto_Open and Workbook_Open macros, so holding it down for
the shortcut key combination has the same effect. OnKey wouldn't change
that.

--
Regards,
Tom Ogilvy


"Jim Thomlinson" wrote in message
...
Tom how do you know these things? One question... Is there a way around

this
setting the

application.onkey

Wondering if you know...

"Tom Ogilvy" wrote:

You are using a shortcut key combination that includes the shift key.
Change the combination to something that does not include the shift key.

--
Regards,
Tom Ogilvy

"Alex St-Pierre" wrote in

message
...
Hello,
My macro run completly if I do manually Macro/Execute
If I execute the keyboard shortcut, the macro stop after the line:
Workbooks.Open "C:\temp.dbf"
Does anyone have an idea ?
Thanks !
--
Alex St-Pierre






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
macro shortcut help ericaamousseau Excel Worksheet Functions 1 March 23rd 10 07:01 PM
Shortcut to a Macro Susan Excel Discussion (Misc queries) 2 July 11th 08 05:18 PM
Shortcut key to VB macro Joe Excel Discussion (Misc queries) 4 December 30th 05 01:46 PM
Macro: With Stop it works. Without Stop it doesn't. Don Wiss Excel Programming 2 October 12th 04 10:49 AM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


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