Macro works but shortcut key will not

vbabeginner92

New Member
Joined
Jul 25, 2018
Messages
13
I made a very simple macro.

Sub Yellow_Highlight()
Selection.Interior.Color = RGB(255, 255, 0)
End Sub

I then assigned it a shortcut key of CTRL+SHIFT+H

When I run the macro using F8 or Visual Basic it works fine. When I try to use the shortcut it does not work. Any suggestions?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
The macro is stored in my personal workbook. I opened a new workbook and the macro will work but the shortcut key does not.
 
Upvote 0
.
In the new workbook, did you place your Shortcut Key macro in ThisWorkbook ... Workbook Open ?

Code:
Option Explicit


Private Sub Workbook_Open()
    'your Shortcut Key Macro here
End Sub
 
Upvote 0
.
Well, one way to activate all of your short cut keys would be to place
them in the same location I described previously.


Code:
Option Explicit


Private Sub Workbook_Open()


    	'your Shortcut Key Macro here


	'another short key macro here


	'and another key macro here


	'and then another one also


End Sub

Do the other short cut keys work ok and this single short cut does not ?
 
Upvote 0
If you have your Macro in your Personal workbook it should work in any workbook.
With the shortcut key

But if you have the same Macro with the same shortcut in your personal workbook and your current workbook there may be a conflict.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top