Changing InputBox text to UpperCase

JBShandrew

Board Regular
Joined
Apr 17, 2011
Messages
54
Hi VBA Experts,

I would like help with another VBA function that I am trying to learn.

I have an InputBox in a .Range statement
.range("$B$57").value = InputBox("test", "Title", default,925,11000)

is there a way to include a command to force the input that is typed in to become Upper or Sentence Case in the cell that the input is placed into?


Thank you inadvance!

Sincerely,

J.B.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Sure:

.range("$B$57").value = UCase(InputBox("test", "Title", default,925,11000))

HTH,
 
Upvote 0
Sure:

.range("$B$57").value = UCase(InputBox("test", "Title", default,925,11000))

HTH,


Now I tried and got an error each time

.range("$B$57").value = Proper(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = Propercase(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = vbpropercase(InputBox("test", "Title", default,925,11000))
 
Upvote 0
Sure:

.range("$B$57").value = UCase(InputBox("test", "Title", default,925,11000))

HTH,


This works very, very well. Now I am trying to get Proper to work the same way without success. What I have tried is below. I do not quite understand how to incorporate StrConv() in the range and inputbox statements.

Help Please?

Thanks again,

J.B.


Now I tried and got an error each time

.range("$B$57").value = Proper(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = Propercase(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = vbpropercase(InputBox("test", "Title", default,925,11000))

I believe you want StrConv()
 
Upvote 0
Now I tried and got an error each time

.range("$B$57").value = Proper(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = Propercase(InputBox("test", "Title", default,925,11000))

.range("$B$57").value = vbpropercase(InputBox("test", "Title", default,925,11000))

Try it this way...

Code:
.range("$B$57").value = StrConv(InputBox("test", "Title", default,925,11000), vbProperCase)
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,152
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top