ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Caps lock (https://www.excelbanter.com/excel-programming/279448-caps-lock.html)

Paula Osheroff

Caps lock
 
I need to make sure information entered in my message box
is in all caps. Is there a way to turn on the capslock in
VBA?

Thanks!

Chip Pearson

Caps lock
 
Paula,

The easiest way is to allow the user to enter the information in any case,
and then convert it to upper case. For example,

Dim S As String
S = InputBox("Enter Something")
S = UCase(S)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com


"Paula Osheroff" wrote in message
...
I need to make sure information entered in my message box
is in all caps. Is there a way to turn on the capslock in
VBA?

Thanks!




Henry[_4_]

Caps lock
 
Paula,

You can't input data into a messagebox!
If you mean an InputBox then allow the user to input in whichever case they
like
and turn their input to upper case in code.

MyString = InputBox ("Your input here")
MyString = StrConv(MyString , 1) 'convert to all upper case


HTH
Henry

"Paula Osheroff" wrote in message
...
I need to make sure information entered in my message box
is in all caps. Is there a way to turn on the capslock in
VBA?

Thanks!





All times are GMT +1. The time now is 05:27 AM.

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