|
-
May 26th, 2005, 12:08 PM
#1
Thread Starter
PowerPoster
Converting textbox to uppercase
How do you convert text in the Keypress event to uppercase everytime you enter a character? I know how to do it in straight VB but not sure in VBA.
Thanks,
Blake
-
May 26th, 2005, 02:00 PM
#2
Frenzied Member
Re: Converting textbox to uppercase
Tengo mas preguntas que contestas
-
May 26th, 2005, 02:07 PM
#3
Thread Starter
PowerPoster
Re: Converting textbox to uppercase
I just used the same method that you use in VB.
Text1.Text = Asc(Ucase(Chr(Keyascii)))
-
May 28th, 2005, 09:57 PM
#4
Re: Converting textbox to uppercase
text1.text = ucase(text1.text)
pete
-
May 29th, 2005, 03:08 AM
#5
Addicted Member
Re: Converting textbox to uppercase
VB Code:
Private Sub Button1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
if u felt my post make u happy ,
then u could make me happy too by rating my post
-
May 29th, 2005, 11:10 AM
#6
Thread Starter
PowerPoster
Re: Converting textbox to uppercase
Dev,
Thanks for the code but that's what I always use for straight VB, however, I did retry it in VBA and it did work. Don't know why it didn't work the first time.
But thanks for the 2 cents.
Blessings,
Blake
-
May 29th, 2005, 12:27 PM
#7
Re: Converting textbox to uppercase
Blake, most of VB6's basic functions, methods, and coding syntax is the same as VBA.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|