UpperCase in InputBOX

kayza

Board Regular
Joined
Apr 29, 2015
Messages
61
Office Version
  1. 2007
Platform
  1. Windows
Hello everyone.

is there any idea how to make input value in inputBox become UpperCase
here is my several codes, and it's not working.
In = Ucase(Inputbox("my message"))
---
In2 = InputBox("my message"))
In2 = StrConv(In2, vbUpperCase)

Any and all help is greatly appreciated. Thank you!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hello everyone.

is there any idea how to make input value in inputBox become UpperCase
here is my several codes, and it's not working.
In = Ucase(Inputbox("my message"))
---
In2 = InputBox("my message"))
In2 = StrConv(In2, vbUpperCase)

Any and all help is greatly appreciated. Thank you!
If you mean, can you make the text the user types upper case as they type it, no, you cannot force an InputBox to do that.
 
Upvote 0
Maybe this is what you want:
Code:
Sub My_Script()
Dim ans As String
Dim anss As String
ans = InputBox("Enter Value")
anss = UCase(ans)
MsgBox anss
End Sub
 
Upvote 0
Maybe this is what you want:
Code:
Sub My_Script()
Dim ans As String
Dim anss As String
ans = InputBox("Enter Value")
anss = UCase(ans)
MsgBox anss
End Sub
Except that you used an extra line of code, that is equivalent to the first attempt the OP posted, namely this...

In = Ucase(Inputbox("my message"))

which he said did not do what he wanted. Because that did not do what he wanted is why I assumed he was wanting to upper case the text the user typed in as it was being typed.
 
Last edited:
Upvote 0
Except that you used an extra line of code, that is equivalent to the first attempt the OP posted, namely this...

In = Ucase(Inputbox("my message"))

which he said did not do what he wanted. Because that did not do what he wanted is why I assumed he was wanting to upper case the text the user typed in as it was being typed.

Thank you for all your help.
Yes indeed, I want the value in the input box to automatically be capitalized, no matter the user write with lowercase or other.
Thank you all
 
Upvote 0
You could use something like this:
Using a Activex Textbox:

Code:
Private Sub TextBox1_Change()
TextBox1.Text = UCase(TextBox1.Text)
End Sub
Private Sub TextBox1_LostFocus()
Cells(1, 1).Value = Me.TextBox1.Value
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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