Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
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/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Hi,
Thats because your code is wrong, use TextBox1.Value = Ucase(TextBox1.Value) regards KM -----Original 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/ . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Thanks for the help. I'm fairly new to VBA and i couldn't figure it
out. Simple when you know how. thanks again. --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Oh dear,
I'm still getting the error, I've tried both options. What i'm trying to do is make sure the information is being transfered from a textbox on a form to a cell and in uppercase. Is it possible to do it on the fly? or something that will turn on caps lock? --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Did you try my keypress code ?
-- HTH. Best wishes Harald Followup to newsgroup only please "CAA" skrev i melding ... Oh dear, I'm still getting the error, I've tried both options. What i'm trying to do is make sure the information is being transfered from a textbox on a form to a cell and in uppercase. Is it possible to do it on the fly? or something that will turn on caps lock? --- Message posted from http://www.ExcelForum.com/ |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Yes,
I tried the keypress code and got the same error at the Asc(UCase$(Chr$(KeyAscii))) line, at the Chr$ part. can't find object or library. --- Message posted from http://www.ExcelForum.com/ |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Sorry for missing the library thing in your original post. In the VBEditor, go Tools
References and uncheck everything "missing". -- HTH. Best wishes Harald Followup to newsgroup only please. "CAA" wrote in message ... Yes, I tried the keypress code and got the same error at the Asc(UCase$(Chr$(KeyAscii))) line, at the Chr$ part. can't find object or library. --- Message posted from http://www.ExcelForum.com/ |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
No joy i'm affraid.
There are lots of references i could add, however there is about visual basic for applications references which when selected give name conflict with current module. Is there a reference in particular that i need? CA -- Message posted from http://www.ExcelForum.com |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
You shouldn't be adding references, you should be unchecking the one that
says MISSING. -- Regards, Tom Ogilvy "CAA" wrote in message ... No joy i'm affraid. There are lots of references i could add, however there is about 5 visual basic for applications references which when selected give a name conflict with current module. Is there a reference in particular that i need? CAA --- Message posted from http://www.ExcelForum.com/ |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
UCase in textbox, help
Sorry,I totaly missed the mark there
Thanks alot, that worked brilliantly, all is good. I can't imagine how on earth that helped but it did CAA --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ucase / macros | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value.doc | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value | Excel Discussion (Misc queries) | |||
UCase Help | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |