Mackeral
Board Regular
- Joined
- Mar 7, 2015
- Messages
- 249
- Office Version
- 365
- Platform
- Windows
These 2 VBA expressions do not function as it the are documented to, and I found that these had been recently implimented and broke code I've been running for years.
INPUTBOX
The docmentation says that if you hit the "Cancel" key that the routine returns a FALSE.
It now returns an Empty String.
The workaround is to use the SetStr function to test for the Escape Key having been used:
"Arg" being the string returned from the InputBox call.
SELECT CASE
The documentation refers to using "Is" or "Like" prior to haing a calculation as part of a "Case" statement. Not only that these don't work; now you can't have any calculations in the "Case" statement. It does not respond to a TRUE or FALSE argument, only what has been presented in the "Select Case" statement.
INPUTBOX
The docmentation says that if you hit the "Cancel" key that the routine returns a FALSE.
It now returns an Empty String.
The workaround is to use the SetStr function to test for the Escape Key having been used:
Code:
Test = SetStr(Arg) = 0
SELECT CASE
The documentation refers to using "Is" or "Like" prior to haing a calculation as part of a "Case" statement. Not only that these don't work; now you can't have any calculations in the "Case" statement. It does not respond to a TRUE or FALSE argument, only what has been presented in the "Select Case" statement.