I have used:
Select Case KeyCode
Case vbKeyEnter and Shift = acCtrlMask
some code
and when I run the program KeyCode = 17 or vbKeyCtrl thus not entering the case statement
I have done:
if KeyCode = vbKeyEnter then
if Shift = acCtrlMask then
some code
end if
end if
with the same result KeyCode is 17. So how is the correct way to write vba code so that something happens when Ctrl+Enter is used.
Select Case KeyCode
Case vbKeyEnter and Shift = acCtrlMask
some code
and when I run the program KeyCode = 17 or vbKeyCtrl thus not entering the case statement
I have done:
if KeyCode = vbKeyEnter then
if Shift = acCtrlMask then
some code
end if
end if
with the same result KeyCode is 17. So how is the correct way to write vba code so that something happens when Ctrl+Enter is used.