jensslofstra
New Member
- Joined
- Sep 13, 2016
- Messages
- 9
Hi everyone,
I was tinkering with the selectionchange event but came across an error.
"Cannot run the macro ''.xlsm'!DropdownList'. The macro may not be available in the workbook or all macros may be disabled."
I checked in my options if the trust center blocked my macro but it's on "enable all macros".
I saved the file as .xlsm so I don't see any problems with the file extension.
The code is as follows. And is written in Sheet1
Does anyone have any idea how I can fix this?
Thanks anyways!
I was tinkering with the selectionchange event but came across an error.
"Cannot run the macro ''.xlsm'!DropdownList'. The macro may not be available in the workbook or all macros may be disabled."
I checked in my options if the trust center blocked my macro but it's on "enable all macros".
I saved the file as .xlsm so I don't see any problems with the file extension.
The code is as follows. And is written in Sheet1
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.OnKey "~", "DropdownList"
End Sub
Sub DropdownList(Cancel As Boolean)
Target.Value = 1
End Sub
Does anyone have any idea how I can fix this?
Thanks anyways!