Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
2003 & 2007
What could cause a macro fine run fine from "Select Run" but not from KB Shortcut? Just in case, I changed the KB Shortcut but still the issue. BTW same result on different computers. Any thoughts appreciated! EagleOne |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
Make sure the short-cut is not assigned to two macros.
-- Gary''s Student " wrote: 2003 & 2007 What could cause a macro fine run fine from "Select Run" but not from KB Shortcut? Just in case, I changed the KB Shortcut but still the issue. BTW same result on different computers. Any thoughts appreciated! EagleOne |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
Does your code open another workbook and fail right after it opens that
workbook? Does your shortcut key include the shift key? If yes, then remove the shiftkey from the shortcut key combination. Holding the shift key while opening a workbook stops the open macros (workbook_open/auto_open) from running. And it can confuse excel enough so that it doesn't know to continue with the remainder of your original code. This is a problem with xl2003 (and below). I don't use xl2007 to know for sure. If this doesn't help, I think you'll have to give more info. wrote: 2003 & 2007 What could cause a macro fine run fine from "Select Run" but not from KB Shortcut? Just in case, I changed the KB Shortcut but still the issue. BTW same result on different computers. Any thoughts appreciated! EagleOne -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
(Gary's Student) Since I have switched keys that should not be the issue.
Thanks for our thoughts Hello Dave, Does your code open another workbook and fail right after it opens that workbook? YES Does your shortcut key include the shift key? YES Got your thoughts on the "Shift" key. What is the issue "open another workbook?" In fact, the macro opens a text file using an array which is ultimately Saved As .xls EagleOne Dave Peterson wrote: Does your code open another workbook and fail right after it opens that workbook? Does your shortcut key include the shift key? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
Just for devilment,
If I wanted to, how would I use (do I need to) ReDim or ReDim Preserve to "clear" the array from memory with the array next? Workbooks.OpenText FileName:="C:\Hold\Directory Listing.txt", _ Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:= _ Array(Array(0, 1), Array(10, 1), Array(11, 1), thru Array(39, 1)) EagleOne Dave Peterson wrote: Does your code open another workbook and fail right after it opens that workbook? Does your shortcut key include the shift key? If yes, then remove the shiftkey from the shortcut key combination. Holding the shift key while opening a workbook stops the open macros (workbook_open/auto_open) from running. And it can confuse excel enough so that it doesn't know to continue with the remainder of your original code. This is a problem with xl2003 (and below). I don't use xl2007 to know for sure. If this doesn't help, I think you'll have to give more info. wrote: 2003 & 2007 What could cause a macro fine run fine from "Select Run" but not from KB Shortcut? Just in case, I changed the KB Shortcut but still the issue. BTW same result on different computers. Any thoughts appreciated! EagleOne |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
Dave,
The Shortcut w/o the shift key worked. Only if you have time (silly me) I would like to know about why the "open file" issue. Thanks Dave Peterson wrote: Does your code open another workbook and fail right after it opens that workbook? Does your shortcut key include the shift key? If yes, then remove the shiftkey from the shortcut key combination. Holding the shift key while opening a workbook stops the open macros (workbook_open/auto_open) from running. And it can confuse excel enough so that it doesn't know to continue with the remainder of your original code. This is a problem with xl2003 (and below). I don't use xl2007 to know for sure. If this doesn't help, I think you'll have to give more info. wrote: 2003 & 2007 What could cause a macro fine run fine from "Select Run" but not from KB Shortcut? Just in case, I changed the KB Shortcut but still the issue. BTW same result on different computers. Any thoughts appreciated! EagleOne |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
This issue is still this:
Holding the shift key while opening a workbook stops the open macros (workbook_open/auto_open) from running. And it can confuse excel enough so that it doesn't know to continue with the remainder of your original code. Since your shortcut key includes the shiftkey, excel thinks that it should stop the auto_open/workbook_open procedures in the newly opened workbooks from running. And since it stopped those procedures, it's gonna stop the rest of yours, too. (That's the confusion part.) wrote: (Gary's Student) Since I have switched keys that should not be the issue. Thanks for our thoughts Hello Dave, Does your code open another workbook and fail right after it opens that workbook? YES Does your shortcut key include the shift key? YES Got your thoughts on the "Shift" key. What is the issue "open another workbook?" In fact, the macro opens a text file using an array which is ultimately Saved As .xls EagleOne Dave Peterson wrote: Does your code open another workbook and fail right after it opens that workbook? Does your shortcut key include the shift key? -- Dave Peterson |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro fine Run fine from Select but not from KB Shortcut?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shortcut to Excel macro? | Excel Discussion (Misc queries) | |||
Rookie at linking - need a tudor!!! | Excel Worksheet Functions | |||
Restarting a macro | Excel Worksheet Functions | |||
Create a print macro that would automatically select print area? | Excel Worksheet Functions | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions |