Macro Keyboard Shortcut NOT working.

Kayslover

Board Regular
Joined
Sep 22, 2020
Messages
136
Office Version
  1. 2013
Platform
  1. Windows
In a nut shell, I assigned a keyboard shortcut to run a particular macro and I started to get strange results all of a sudden whilst running it. I therefore posted a help thread headed “File SaveAs weird behaviour yesterday (see following link to get more information). File SaveAs weird behaviour.

I noticed, that rather than using the keyboard shortcut, if I ran the macro by selecting ALT+F8 and running it from there, then I didn't get any strange results and the macro ran as expected.

So I repeated the test by running from Keyboard Shortcut, and again strange results, ran by using ALT+F8, and no problems. I can recreate this behaviour at will.

Did a search on Google using “macro keyboard shortcut not working” and it displayed results that people had reported.

One of the things I read was that if you remove the shortcut key, rename the macro, assign a new key then it should work.

Alas it didn’t work, and therefore I am using the ALT+F8 option.

I hope that the above helps people if they encounter strange results/behaviours. This drove me loopy lef me tearing my hair out and questioning my sanity.
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,432
Office Version
  1. 365
Platform
  1. Windows
Not something that I've had happen, but I would imagine that the method that you've tried to reset the shortcut would be for a shortcut that is not working at all rather than the code not working as expected, although it does seem strange that the same code would behave in different ways depending on the way that it is initialised.

What happens if you remove the shortcut from your existing code then assign it to this code? Where 'MyOldCode' refers to the name of the existing procedure.
VBA Code:
Sub NewShortCut()
    Call MyOldCode
End Sub
 

Kayslover

Board Regular
Joined
Sep 22, 2020
Messages
136
Office Version
  1. 2013
Platform
  1. Windows
Jasonb75,

Tried your recommendation and it causes the same proble. The macro starts and then gets to the first open of a file and then just STOPS.

I have created this thread, for informational purposes only, just in case people start of get strange behaviour and it is advice that they are not loosing their sanity.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,345
Messages
5,624,131
Members
416,012
Latest member
rockermom59

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
Top