View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default UCase in textbox, help

Hi Caa

This
UCase (st)
is not a command, it's a value. So it does nothing. Try simply

TextBox1.Text = Ucase(TextBox1.Text)

Or if you want to do this on entry, which sometimes is a good idea:

Private Sub TextBox1_KeyPress(ByVal _
KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 97 To 255
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
Case Else
End Select
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"CAA" wrote in message
...
I don't know what is wrong here.
I get a can't find project or library error.
Any suggestions peeps?

Private Sub TextBox1_AfterUpdate()
Dim st As String
st = TextBox1.Value
UCase (st)
TextBox1.Value = st
End Sub

Thanks for looking
CAA


---
Message posted from http://www.ExcelForum.com/