Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Macro not running properly when shortcut is used

I've written a macro that formats data then copies a range to an
email. It works fine when run from the VBE where I did all my
testing. When I moved it onto the end-users desktop and assigned a
shortcut key it stopped working properly. If run by way of the
shortcut key it runs through the first few lines of code and then
exits the macro completely.

It still works if I go to ToolsMacroRun

Set wbCurr = ActiveWorkbook
Set wsRaw = wbCurr.Worksheets(1)
sTempFilePath = "R:\CDR\Cust Serv\DailyStatsTemplate
\DailyStatsTemplate.xls"
Set wbTemplate = Workbooks.Open(sTempFilePath)

After opening the template workbook the macro ends completely.


I've never run into anything like this. Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro not running properly when shortcut is used

Remove the shiftkey from the shortcut combination and try it out.

Aviashn wrote:

I've written a macro that formats data then copies a range to an
email. It works fine when run from the VBE where I did all my
testing. When I moved it onto the end-users desktop and assigned a
shortcut key it stopped working properly. If run by way of the
shortcut key it runs through the first few lines of code and then
exits the macro completely.

It still works if I go to ToolsMacroRun

Set wbCurr = ActiveWorkbook
Set wsRaw = wbCurr.Worksheets(1)
sTempFilePath = "R:\CDR\Cust Serv\DailyStatsTemplate
\DailyStatsTemplate.xls"
Set wbTemplate = Workbooks.Open(sTempFilePath)

After opening the template workbook the macro ends completely.

I've never run into anything like this. Any help would be appreciated.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Macro not running properly when shortcut is used

Thanks Dave, I'll give that a try.
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
Shortcut key not running macro properly Ted M H Excel Discussion (Misc queries) 5 October 1st 08 11:07 PM
Excel 2000 running on Windows XP SP2 does not properly open CSV fi Oscar Excel Discussion (Misc queries) 1 December 20th 04 10:10 PM
Running a shortcut Newbie Excel Programming 1 June 17th 04 12:18 PM
Macro shortcut keys not work properly Matan Excel Programming 1 April 20th 04 02:15 PM
Running a macro from a desktop icon shortcut Sofia Excel Programming 2 July 15th 03 08:01 PM


All times are GMT +1. The time now is 05:28 AM.

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

About Us

"It's about Microsoft Excel"