ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   All uppercase characters (https://www.excelbanter.com/excel-programming/340487-all-uppercase-characters.html)

Brad

All uppercase characters
 
For the following line of code:

UserVal = Application.InputBox("Symbol?", , , , , , , 2),

irrespective of what I type, when it is later retrieved, I'd like all the
characters stored in UserVal to be uppercase, not lowercase. So, if I type
"ibm," I'd prefer it to be saved as "IBM." It'll save me toggling the Caps
Lock key on and off!

My thanks in advance for any help. Brad



Norman Jones

All uppercase characters
 
Hi Brad,

Try:

UserVal =Ucase( Application.InputBox("Symbol?", , , , , , , 2), )


---
Regards,
Norman



"Brad" wrote in message
...
For the following line of code:

UserVal = Application.InputBox("Symbol?", , , , , , , 2),

irrespective of what I type, when it is later retrieved, I'd like all the
characters stored in UserVal to be uppercase, not lowercase. So, if I type
"ibm," I'd prefer it to be saved as "IBM." It'll save me toggling the
Caps Lock key on and off!

My thanks in advance for any help. Brad




Mark

All uppercase characters
 
use the Ucase() function in your assignment statement.

StorageSpot = Ucase(input)



Tempy

All uppercase characters
 
Hi Brad, i had the same problem and i solved it with the following

userVal1 = Application.InputBox("Symbol?", , , , , , , 2),
userVal = uCase(userVal1)

This will make all in userVal Caps

Hope this helps,

best regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com