Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ucase / macros MrDave Excel Discussion (Misc queries) 1 July 26th 09 11:07 AM
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
UCase Help holder2k[_2_] Excel Programming 2 November 22nd 03 03:35 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"