Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




First Letter UpperCase And The Rest LowerCase In Text Box?


How can i make this things happen. Please help me with my problem. thank in advance.

_________________________________________________________
Open the mind and create the Future but Remember to clean the Mess Afterward




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Force Every Letter Entered In Text Box To Be Uppercase
How do I force every letter typed into a textbox to be uppercase. Also where is the best place to put this code ie keyup or keydown etc.

When the user types in hello to the textbox when they press h it should appear as H and so on.

Regards, Locutus

Uppercase/Lowercase
I'm writing a program that checks spelling using word and excel. I throw some text into word or excel, which ever one I'm using, and this text is all in uppercase letters. For word, it was easy to convert the Word.Selection.Text = strconv(string, vblowercase) but for excel I'm lost. How would I change all the text in excel to lowercase or uppercase... any suggestions???

Uppercase & Lowercase
Thanks all for your help but pardon me for thinking like a idiot
but how do i put the code you all sent me into my program.
for instance in one text box i wish to change the first letter to capital on inputing the name i have attached part of the code for this form

private sub text1_change (index as integer)

dim temp_spread as currency
dim tempnum
dim ipt
dim vb
dim mystring as string
mystring =""
debug.print ucase(left$(mystring,1)) & lcase(mid$(mystring,2))

the text box is text1(37)

UPPERCASE/LOWERCASE Comparison
Hello Gurus...


VB Code:
Private Sub Command1_Click()Dim strString1, strString2 As String     strString1 = "[color=Red]A[/color]bc"    strString2 = "[color=Red]a[/color]bc"        If strString1 <> strString2 Then        MsgBox "Not the same value"    Else        MsgBox "Same value"    End If End Sub


The result above is "Not the same value".
This is because of letter "A" for strString1 is UPPERCASE and letter "a" for strString2 is LOWERCASE.

How to avoid UPPERCASE/LOWERCASE comparison in string?

Thanks

Uppercase &amp; Lowercase Part 2
thanks all for your help but how do i put this code into my form

do i have to define mystring as a string

and how do i get it to work when i input a name into the text box

thanks

bob

Uppercase &amp; Lowercase Method
I am writing a program that stores names & addresses how do i when inputting a name for instance get the upper or lower case method to force it to display this format.

eg Mr Robert Briggs

capital letters for the first part of the string and lower case for the rest

I am using VB4 Professional

Hope someone can help

many thanks

Problem With Uppercase And Lowercase
The code below search for a certain word and gives me a total of words found.The proplem however is it is case sensitive.Like when I search "Dim" it will give me a total like 6, but when I search dim it will give me a total of 0 what do I need to let it searc upcase and lowcase



lngPos = InStr(strLine, txtSearchString.Text)
If lngPos <> 0 Then
blnFound = True
lngOffsetSearched = lngOffsetSearched + lngPos
strLine = Right(strLine, IIf(lngOffsetSearched <= Len(strLine), Len(strLine) - lngOffsetSearched, 0))
If blnFound Then
intInstanceCount = intInstanceCount + 1
End if


Thanx very much guys

Uppercase/lowercase &amp; Spelling Checks...
Hi im building this trivia game

1st) how can i make it so that the text entered into a text box and when a command button is clicked, it will look at the text and it will not matter if the letters stored in the varible is uppercase or lowercase and it will not prove it wrong...

2) How can i make it so that if the spelling is near correct of the answer that they put in, it will correct it and allow it and if its far off it will prove it wrong??

Thanks

How To Accept Uppercase And Lowercase In Inputbox?
hi guys

i would like to make a little tweak to my program however i am struggling to do so

i have declared the variable "A" in my program,
then i use a inputbox and ask the user to type something.
if he types "A" as required, it opens a file etc..
however if he types "a" in lowecase nothing happens?

so i was wondering, is there any way to force entry of "A" into the inputbox, so what ever he types anything lowercase in the inputbox will automatically be capitlized into uppercase in the inputbox.

either that or just make visual basic accept both "A" and "a" and produce the same output.

can you please tell me which method is best, bearing in mind that i would like it to take as little coding as possible.
1 line of code would be great if its possible?

thanks

Simple (Lowercase / Uppercase) RESOLVED
I have three lists boxes.

List1 - A list of words.

ok i want to click a buttn and it will go down every word in list1 and if it contains a capital letters it gets added to list2 if it doesn';t it gets added to list1

thanks in advance

How To Convert Uppercase To Lowercase In A Textbox As I Type?
hello everybody,

i got a new problem with my app. i want to convert uppercase to lowercase in a text box as i type by. so when i type "A" it should automatically convert to "a" and when i type the rest like APPLE, then it should convert everthing to lcase. also is there is any way i can restrict some dirty words from entering into the textbox so that enduser cannot out dirty words in the text box and save it. i find a solution to check for dirty words. below is my code.


VB Code:
Private Sub Command1_Click() If Text1.Text = "*******" Then   MsgBox "You cannot enter this word in the field."   Exit Sub End IfEnd Sub


but for every word, i have to use IF all the time. so is there is anyone where i can use only 1 IF and it will check rest like example..


VB Code:
Private Sub Command1_Click() If Text1.Text = CheckWord Then   MsgBox "You cannot enter this word in the field."   Exit Sub End IfEnd Sub

Uppercase And Lowercase Issues In Access / Vba Program
I have an access DB , one of the tables has a field for wharehouse location which can be either a number or a text field. I have set the fields format to > as I want the text entry to be uppercase. In the database this works fine, if the user enters "ue" in the DB it is converted to UE. But when the ascii file is generated from the table the field is written as ue ( lowercase ). The ascii file process just reads through each record and writes it to the file. I dont really want to change the VBA code if possible because it is all object orientated code and I have'nt done much in the way of OO. Is access only displaying the field with ue as uppercase instead of truly converting in ?. Can I get access to convert it permently in the table so that when it is written to text file it comes out as uppercase. I would really like access to do this for me as I am not 100% on the code and don't want to affect anything else.

Thanx for any help
Locutus

First Letter Capital, Leave The Rest
What code do i use to make the first letter capital but leave the rest of the letters alone (So i cant use StrConv because that converts all the other letters to lowercase).



thIs shouLd BecomE


ThIs ShouLd BecomE

UpperCase And LowerCase Interferring In Search &amp; Location Search
Title kinda explains it... In a listbox I have a list of words (Lots of them). Some of these words have capital letters (Names and such) but when the 'user' types in a word in the search textbox with all lowercase letters, it only lists the words that start with lowercase letters

(Example)

User Types in = "case"

Words in results:

case
casebox

Words not in results, but should show up:

Case
Case of Billy
Case of the cases of caseness (Yes, i know i'm making up words, but these are examples)

So, i need it to search for upper and lower case letters in a word, no matter where it is...



Also, I need the keysearch to pick up on words in the middle of the string...

(Example...)

User types: "case"

Should show but doesn't:

Guitar Case
Violin Case
The fifth word is Case and it won't show up!

So, I hopefully got that squared away 'clearly' if it is even remotely close to that... I'm searching for these things in a text file, using the 'Reading Records' Lesson I used in class. The notepad looks like this:

"Guitar Case"
"Case"
"Violin Case"
"case"
"casebox"
"Case of Caseness"

and i'm using this code to recall the data, so these fixes have to fit in with it:

Code:Private Sub txtboxSearch_Change()
    Dim intfile As Integer
    Dim strSearch As String
    Dim strResult As String
    Dim strPattern As String

    strSearch = txtboxSearch.Text
    intfile = FreeFile
    listbox01.Clear
    
    Open "D:Results.txt" For Input As #intfile
    Do While Not EOF(intfile)
        Input #intfile, strResult
        strpattern = strSearch & "*"
        If (strResult Like strPattern) Then
            listbox01.AddItem strResult
        End if
    Loop
    Close intfile
End Sub

This search works really well , (except for the problems above of course)... If you can't see how strPattern works, it puts what the user typed in the box with an astrik in front of it so I can use the 'Like' thingy <---(newbie word)

Thanks in advanced!

Changing First Letter To Uppercase For Each Word In A Line
hi,
as in the title,
i want to change the first letter of each word to uppercase in a line of words.

i know how to do it for one word,

Code:
Private Sub txtName_Change()
txtName.Text = UCase$(Left(txtName.Text, 1)) & LCase$(Mid$(txtName.Text, 2))
txtName.SelStart = Len(txtName.Text)
End Sub

but when there are more than 1 word how to do it ?

Need Help To Make First Letter Of All Words In A Textbox To Uppercase
so, i have this code to convert first letter of word to uppercase:


Code:
Private Sub txtFields_Change(Index As Integer)

txtFields(Index).Text = UCase$(Left(txtFields(Index).Text, 1)) & LCase$(Mid$(txtFields(Index).Text, 2))
txtFields(Index).SelStart = Len(txtFields(Index).Text)
End Sub
but, this was before i realize that i'm actually working with textboxes where more than two words are entered, i need some help with this code so that first letter of all words in a textbox will become uppercase...

anyone, pls? tnx.

Force First Letter Of Each Word In Sentence To Uppercase?
I need to force the first letter of each word in a sentence to uppercase. I saw a method for doing this a while back but I can't remember what I saw!

Thanks!

Make First Letter Of A Text Box A Capital Letter ?
Is it possible to make the first letter of a text box a Capital letter. Would I do some sort of formatting to the textbox itself or would I just take the string entered and change it myself? Either way, How would I go about doing that?

Where Did The Rest Of The Text Gone To? *** RESOLVED ***
Hi

I am creating a website and come accross a little problem.

I want to display something on the page (that i gotten from a db ) in a Textbox (<INPUT id=text1 name=text1 >) .
When i set the value to the vairible only the fisrt word of the data is displayed.

It must be
>> Friday 1 February 2002 at 12:00 pm
but only
>> Friday
is displayed

Can anyone explain what i must do

.text Is Lowercase
For textboxes and comboboxes, my .text property is lowercase and not uppercase T as usual. Does anyone know how to fix this? Thanks.

Making Text Lowercase
i have two textboxes, the first one a sentance is typed and then a command button is pressed, then in the second textbox the sentance that was typed appears but i want it to make it all lower case and also make the first letter of the first word a captial, for example:

textbox1:

hello world how are you today

textbox2:

Hello world how are you today


thx

Letter By Letter Text (RESOLVED)
how do i make text in a label appear on screen letter by letter?
e.g this is what i want:
this text: "hello everybody"
to appear one letter after another with a very short ammount of time between each letter. so it would go like this:
H
*short delay*
He
*short delay*
Hel
*short delay*
Hell
*short delay*
Hello
*short delay*
Hello
*short delay*
Hello e
*short delay*
Hello ev
*short delay*
Hello eve
*short delay*
Hello ever
*short delay*
Hello every
*short delay*
Hello everyb
*short delay*
Hello everybo
*short delay*
Hello everybod
*short delay*
Hello everybody
*Stop*

Reading Text Letter By Letter
how do i get VB to read inputed text, letter by letter, making an If statement for every letter entered, for instance. if the person were to type in "Hello" it would output 0304050506, H = 03 E=04 L=05 and O = 06. something like that.

Upper And Lowercase Text Select
I use Informix database.
The following command:


Code:
SELECT ID, name, address from custs where name like '%im%'
returns only 'Jim Smith' and NO 'JIM SMITH'.
Is there any way to tell informix to select records that have both lower and uppercase in the same SELECT statement?

THX in advance

Text Box Uppercase Only
Sorry for asking so many questions. I have searched the posted files and don't see where I need to go. I want Text2.Text to be all uppercase no mater what the user types in. I have looked in all my VB6 books and can not find what I need. Please point me in the right dirrection so I can figure this out. Thanks so much.

UpperCase Text
if everytime the users types into a text box, i want to be able to make the text upper case, whether or not the caps lock is on or not. Any suggestions??

Make Text Entry In A Text Box UpperCase
Hi,

Can anybody tellme how to force a textbox to show uppercase letters when the user types some text.Whenever a user types something it should be converted to uppercase and shpuld be displayed.

Set First Char In A Text Box To Uppercase
I need to set ONLY the first char in a textbox entry from the user to Uppercase.

Any ideas?

Thanks

VBA: Converting Text To Uppercase
I know how to convert text to uppercase in the Keypress event in VB but how do you do it using VBA?

Thanks,

Blake

Make Text In Textbox UPPERCASE
hi

how can i make sure that any/all text in a textbox is automatically in UCase?

thx

Extracting Uppercase Text From A String
Hi All,

Im trying to find a function that allows me to extract the UPPERCASE text from the string:

"Please enter the FIRST, FOURTH and LAST digits of your security number"

Any ideas would be appreciated.

Thanks

Determine If Text Is Uppercase Or Lower?
Just incase you all think im making a cracking key generator program im not, im making a simple password maker program where you can generate random codes for use in your own registration programs.

Anyway, i have many options, the one in paticular is to determine whether the user wants his generated key to be in Uppercase or Lowercase. Then when you click Generate, if it is in Uppercase, the generated string should be in Ucase, and Vice Versa. (I also need to know how to make all generated characters be converted into a random case, so some characters are Ucase, others Lcase etc. For example "THiS striNG cONtAins a MiX OF ucAsE and LCAse ChaRACTerS", but i dont need that just yet.)

Cheers

How Do You Turn All Text In Richtextbox To Uppercase?
how do you turn all text in richtextbox to uppercase?

Make Text UPPERCASE In Text Box...?
Hello,

This is probably easy, but how do you make the text in a textbox uppercase as you are typing. In other words, I only want uppercase letters to appear in my textbox as I type.

Thanks!

First Letter In Text Box
Hi
Would anyone know how to make the first letter in a text box a Capitol letter?

I'm new to VB and can't figure this one out.

Kim

Only Letter In A Text Box
How is it possible so that when any other character other than a letter is typed in a text box, it beeps and the letter does not show up.

Thanks



[Edited by cramtheman on 12-24-2000 at 12:32 PM]

Cut Last Letter Off Of Text
I have a text box called "num" and a button, "num" will contain a number. But what I need to do is when I click the button it will take the last number off of "num", so if I type "153" in num and I hit the button the text in num will change to "15". (254 = 25, 376 = 37 ect.)

Help is GREATLY appreciated!

Action By First Letter Of Text
Hi,

I have a large set of data on an Excel spreadsheet and what i need to do is sort it by the Name. So for example i need something that carries out the following:

Goto First cell
if text begin with 'A' copy line, paste on sheet 'A'
if 'B' then copy line, place on sheet 'B' ..........etc
endif
next cell

I know its pretty basic but i'm just starting of so even the basics are unknown at this point. Is there anyone that can help ?

Specific Letter In Some Text
Hi,
Do you know how to find specific letter in some text
is there any function for that ?

Getting First Letter In Combobox1.Text
How do I put the first letter from a combobox's text into a string or label or something? It seems like it should be pretty easy, but I just can't figure it out

Thanks!

Adding Text To Every Letter
ok i have 6 checkboxes and 4 textboxes basically i enter text in the textboxes example
Textbox1:Hello
Textbox2:i
Textbox3:am
Textbox4eCo
each textbox represents a specific symbol what i want to do is add the symbol to every word in the textbox for example if i only checked check box one it would look like
Hello
But if i checked two text boxes it will look like
He$ll$o and so on... i would appreciate the help thank you!

Encrypt Text To This Letter ----&gt; &#143;
Hey People.



I really need some advice. I need to encrypt say "password" to "" and store it in my "SQL database" please could someone help. is there any way.



Many thanks

Daniel Graham

 

Remove Text Save Last Letter
Does anyone know how to remove all the text of a text box but keeping the last letter?

Voice To Text Letter Writing
I have the voice to text component installed in my VB, and I'm wondering how hard it would be to make something like this...What I mean is, could i make it like indent if I said certain things or like, "backspace" deletes the previous word? Thanks for the help.

PLEASE HELP! How Can I Know If A Piece Of Text Is A Number Or Just A Letter?
hey,

how can I know if a piece of text is a number or a letter?

thanks in advance!

Writing A Letter To A Text File
I am creating letters and sending them to a printer. Is there a way to write them to a text file and save them in such a way as to be able to open the file and see an exact copy of the letter as if it were printed by the printer. I don't want it to have control charactors in it like if you used an Rich Text Box RTF



Edited by - Gary2263 on 6/29/2007 2:17:51 PM

Find 1st Letter In Rich Text Box
Hey,
I'm new to RTB (Rich text box). I have an RTB on my form, and with the click of a command button, I'd like the program to find the first instance of a letter in the RTB using the rtb1.find function. Any ideas on how to do this?



Edited by - Marce22 on 12/19/2003 10:40:34 AM

Change Textbox Text Colour For Different Letter.
Hi,

I am creating some mental maths testing software for a school, and when the student enters an incorrect answer, I want all the parts of the answer in the textbox to change colour. For example, if the answer is 1234, and the student enters 1233 into one textbox, I want the last three to change to a different colour.

Is it possible to change the colour of just one or two letters in a textbox?

Regards,
Bellportal

Copyright 2005-08 www.BigResource.com, All rights reserved