VBA SendKeys

GRCArizona

Board Regular
Joined
Apr 24, 2010
Messages
95
Hi - anyone know how to check if a user has the Developer Ribbon menu visible?

I've got the following code:

Worksheet_Activate
Application.SendKeys "%L%"
End Sub

This works fine (IE: selects the Developer tab when the sheet is activated), but if one of the users does not have the Developer tab installed, when worksheet is selected, all of the shortcut keys are displayed. The macro looks like it is basically hitting "ALT" to display the shortcut keys and not finding the Developer tab, so it is not hitting "ALT" to hide the shortcut keys.

so....million dollar question. In VBA, how can I have a line of code that does something like:
IF macro can select Developer ribbon tab then
msgbox "OK"
Else
msgbox "You don't have the Developer tab installed"
end if
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,

This will show the Developer tab on start up:

Code:
Private Sub Workbook_Open()
    Application.ShowDevTools = True
End Sub

You could use the command elsewhere as well, of course.
 
Upvote 0
Rick...many thanks man! That works perfect. I've altered my code so it is now:

If Application.ShowDevTools = True Then
Msgbox "Developer Ribbon tab installed"
Else
Msgobx "Deverloper Ribbon tab hidden"
End If

works exactly for what I need.
 
Upvote 0
Good news and thanks for letting me know.

By the way, what exactly is a Deverloper?
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,146
Members
449,098
Latest member
Doanvanhieu

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