LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Macro keyboard shortcut problem

I assigned Ctrl-Shift-Z to the macro below. When I execute the macro via
Tools | Macro | Macros... | Run, everything works fine. But if I execute the
macro via the keyboard shortcut, the macro inexplicably stops right after
line 7. Has anyone else run into this problem and/or can explain why it
happens? Please note that "Rates.xls" is open prior to running the macro.

Any help would be greatly appreciated. Thanks.

1 - Sub CleanUp()
2 - Application.ScreenUpdating = False
3 - Application.Calculation = xlCalculationAutomatic
4 - fname = ActiveWorkbook.Name
5 - pname = ActiveWorkbook.FullName
6 - spath = Left(pname, Len(pname) - Len(fname))
7 - Workbooks.Open Filename:=spath & "Taxes.xls"
8 - Workbooks("Rates.xls").Activate
9 - ActiveSheet.Rows("1:5").Delete Shift:=xlUp
10 - ActiveSheet.Rows("2:2").Delete Shift:=xlUp
11 - more code...
55 - End Sub
 
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
Edit Menu Keyboard Shortcut Problem Wil Excel Discussion (Misc queries) 1 January 31st 09 08:13 AM
keyboard shortcut for a macro Gary[_2_] Excel Worksheet Functions 3 October 24th 07 07:25 PM
Unassign Macro Keyboard Shortcut? Dave Birley Excel Programming 2 June 8th 07 03:43 PM
Excel 2007 Date Keyboard Shortcut problem Daniel L. Lieberman Excel Discussion (Misc queries) 9 May 17th 07 02:22 AM
Keyboard Shortcut in Macro osaka78 Excel Discussion (Misc queries) 3 January 16th 06 08:47 AM


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