Excel 2007 - VBA with Disabled Dropdown

MJK

Board Regular
Joined
Dec 4, 2002
Messages
179
Hi - I inherited an Excel VBA spreadsheet that has data validation dropdowns that are disabled (grayed out) in the menu. What type of code should I be looking for the enable the data validation dropdowns?
Thanks
MJK
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Yes the was protection. I unprotected the sheet and was able to edit other parts of the spreadsheet, but the data validation is still grayed out in the menu. I think there may be code that needs to be modified, but I have no clue what to look for.
 
Upvote 0
Do you have any event procedures taking place?
Right Click the Sheet Tab, click View Code...
If the VBA editor page that opens is blank, you have no worksheet event code.
You can also check for WorkBook event code.
In the VBA editor, double-click the "Thisworkbook" module.
If the VBA editor page that opens is blank, you have no workbook event code.
To open the "Thisworkbook" module in version prior to Excel 2007;
Right Click the Excel Icon to the left of the File Menu, click View Code...
 
Upvote 0
It there - so it appears that is not a dropdown (data Validation) but instead a list box - correct?

Private Sub ListBox1_Click()

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim CommBarTmp, Commbar As CommandBar

If ScheduleToBeSet = True Then

For Each Commbar In Application.CommandBars

Set CommBarTmp = Commbar.FindControl(ID:=847, recursive:=True)

If Not CommBarTmp Is Nothing Then CommBarTmp.Enabled = False

Next

End If

End Sub
 
Upvote 0
I would Delete/Remove the code you listed above.
It is making some kind of changes to your workbook menus.

After deleting the code, save the workbook with a different name and reopen.
It should be fine then.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

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