shortcut key and Alt F8

tim963

Board Regular
Joined
Aug 20, 2002
Messages
58
I have some Marcos with a “shortcut key” assigned to them, is there any way to not have them show up when I do Alt F8? I know you can put private in front of the sub, but when I do the “shortcut key” will not work. Excel ’97. Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
From the VBA editor, select: Tools-VBAProject-Project Properties, Protection, then:

Check "Lock"
Type your password
Close the editor.
Save the workbook.

The next time you open your workbook,
if you hit Alt-F8, your macros will show up but will not be available for "Edit" if you view code you must type the password to work in the editor.

This will lock most users out of your code. JSW
 

tim963

Board Regular
Joined
Aug 20, 2002
Messages
58
Joe, I don’t need to lock the project from editing , I want to be able to use the shortcut keys but not see the Marco with Alt F8, as stated by Von Pookie above this might not be possible
 

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530

ADVERTISEMENT

If all you want to do is disable that shortcut combo, you can put this code in your workbook module:

<pre>

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "%{F8}"
End Sub

Private Sub Workbook_Open()
Application.OnKey "%{F8}", ""
End Sub</pre>

HTH
 

tim963

Board Regular
Joined
Aug 20, 2002
Messages
58

ADVERTISEMENT

Juan, Option Private Module want let the shortcut keys work
 

tim963

Board Regular
Joined
Aug 20, 2002
Messages
58
I don’t want to disable the Alt F8 combo because there are Marco in the personal folder that need to be run sometime
 

Forum statistics

Threads
1,143,748
Messages
5,720,625
Members
422,293
Latest member
camillel

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