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




Upper Case In Excell Cell


Hi

Can any body please tell me about any formula in excell to Set the value in any cell to upper case by reference.
i want to set the value of my cells to upper case using any formula and i want to just give the reference. e.g =UPPer(a1,a5)

Upper is not working for reference

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
HOW TO CONVERT A FILE NAME FROM UPPER CASE TO LOWER CASE Or Make It Case Sensitive
Hi,

I have a folder path of my database that need to be case sensitive. Right now it works only on the lower case
when some one is using the Upper it does not work. Is this doable?

thanks,

stash

Change All Upper Case To Lower Case In Text1
How can change all upper case to lower case letter in text1 on a command click?

UPPER CASE/LOWER CASE NA DOTHER TXT THINGS
1)

I need a textbox to be all in upper case
I have tried the code
Code:
Private sub Text1_Change()
text1.ucase
End Sub



THere an err Member or Data not found. What code should i use


2) When a textbox is over 3 charecter long how do i make the focus go to the nxt textbox and how do i know when the txt box is > 3 charecter long?

3)
How do i read a paffic line of text from a file
 so not reading every line just somthing like
e.g LINE 8?


Thx

Lower Case And Upper Case -- Keypress
Hi all,

My question is the following:

I want the first letter in the textbox to be a UCase and the others LCase
i know the code that i have written here is only for LCase, how do i combine the UCase code with the LCase code.

If KeyAscii >= 65 And KeyAscii <= 90 Then
KeyAscii = KeyAscii + 32
Exit Sub
Else
End If

Any help will be appreciated

Regards
Gimly

Upper Case + Lower Case Problem ??
Hi,

I have encountered an ODBC error as following, hope someone can help ?

Access database using ODBC as connector
A data field "Note No" defined as "text" in the database
A textbox with user input "BH32214a"

Operation: RS!noteno = txtNoteNo.text

Error occured if txtNoteNo.text = "BH32214a"
Okay if txtNoteNo.text = "BH32214"

Actually, error occured if any lower case character inputted.

Why ????

Upper Case And Lower Case
All

I know I can use Ucase and Lcase to get

HELLO

and

hello

from a string but how do i get

Hello

cheers

Gibbo

Upper Case / Lower Case
Hi everyone,

For part my university assignment, I have to write a program that will change the case of certain letters of a word. I got the code, and it 90% works. It takes the word (a last name inthis case), it finds the letters, and it converts lower case letters to upper case. However, it doesn't convert upper case letters to lower case. I've posted the code, if anybody can see an apparent error, I'd really appreciate if you pointed it out to me. Thanks.

VB Code:
Private Sub cmdModify_Click()    Dim sName As String    Dim sLastName As String    Dim sLetters As String    Dim iCtr As Integer    Dim iCtr2 As Integer    sLetters = "acfsv"        sName = txtName.Text    sLastName = Mid(sName, InStr(1, sName, " "))        'replacing loop    For iCtr = 1 To Len(sLastName)        For iCtr2 = 1 To Len(sLetters)            If Mid(sLastName, iCtr, 1) = Mid(sLetters, iCtr2, 1) Then                If InStr(1, UCase(Mid(sLastName, iCtr, 1)), Mid(sLastName, iCtr, 1), 0) Then                    Mid(sLastName, iCtr, 1) = LCase(Mid(sLastName, iCtr, 1))                End If                If InStr(1, LCase(Mid(sLastName, iCtr, 1)), Mid(sLastName, iCtr, 1), 0) Then                    Mid(sLastName, iCtr, 1) = UCase(Mid(sLastName, iCtr, 1))                End If            End If        Next iCtr2    Next iCtrlblReciept = sLastNameEnd Sub

How To Display Upper Case Letters In Text Box While Pressing Lower Case Letters
I want to Display Upper Case Letters in Text Box while Pressing Lower Case Letters, I tried with

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii >= 65 And KeyAscii <= 122 Then
    Text1.Text = UCase(Text1.text)
End If

End Sub

but it is printing in reverse , is there any other mothods.


Thank you.

Upper Case
hi,
There a bad problem, unlike Win98 in WinXP, operating system will save files in upper case by default.
How change this behaviour?
thx.

Upper Case
hi!...any ideas how u change the first letter of text into a capital letter??

Upper Case
Hi All,

I have 4 text fields filled up with info like so

TextField1.text = alex
TextField2.text = riches
TextField3.text = 62 hunters way
TextField4.text = saffron walden

How can I get it so that every first letter of each word within each text field up changed to upper case? so that afterwards it would look like this.

TextField1.text = Alex
TextField2.text = Riches
TextField3.text = 62 Hunters Way
TextField4.text = Saffron Walden

The length of each text field also could be diffrent.

Thanks

Loftty

If Upper Case The
How can I check to see if a textbox contains all Upper Case or all Lower Case from within the Text_Change Sub. I know how I could do it in the KeyPress by using the KeyAscii but obviously that methid will not work in the Text_Change. Please help me out guys.

Thanks in advance.

Upper Case
Hi Friends,

How to force users to enter the data in the forms in
textboxes
in upper case only,irrespective of caps lock on/off.Pl. can u send
me the sample code if possible.
Thanks in advance.

Regards,
Prashant

Upper Case
I would like to know how to make a text box display what the user types in it upper case. I use textbox.text = ucase(textbox.text) but it puts the cursor back at the beginning of the word. I would like for the cursor to stay at the end of the word that they are typing where they can keep typing and not have the hit the end key. Thanks

Compare String In FlexGrid Cell To Excell Sheet Cell
I have a string in a cell of a flexgrid that I want to compare to a string in an excel sheet cell

I tried doing this:
MsFlexGrid1.Col=0
MsFlexGrid1.Row=0

If MSFlexGrid1.Text = XLSheet3.Cells(3, 1) Then

'Do the stuff I want to do

End If

But it gives me a runtime error and points to this.

Are they of different types? How can I compare these two strings?

Upper Case And Time
Could someone help me to display the time with the seconds ticking. I am currently using the 'Time' reserved word. But the seconds dont tick

Also I cant convert lower case into upper case. I have tried the following
!
!("text.text")
!text.text)
UCASE
UPPER
none work

Check For Upper Case
Sorry to bother everyone again. I have just found a small bug in my program. I need to check a string for upper case characters. I need to determine whether string positions 2 thru 6 are upper case. Can't seem to do this. Can someone lend some helpfull advice? Thanks

Getting Upper Case In Input Box
VB 6 Enterprise; os = Window XP Pro

I have a common routine (see below) that is called from various places im my VB6 app.

The output of the "Inputbox" is uppercase. How can I force uppercase characters to be shown while the user is typing the information into the Inputbox?

Public Sub AskUserForAssemblyNumber()
HoldAssemblyNumber = UCase(InputBox("Enter the Assembly Number.", "Assembly Number"))
If Len(HoldAssemblyNumber) = 0 Then
NoReport = True
Exit Sub
End If
SQL = "Select * from AssembliesOnly where dbAOAssembly = '" & HoldAssemblyNumber & "';"
Call GetAssembliesOnly
If rstAO.RecordCount = 0 Then
Call MsgBox("Assembly Not on File.", vbInformation, "Assembly Not On File")
Exit Sub
End If
HoldSequenceNumber = rstAO!dbAOSequence
End Sub

Converting To Upper Case
Greetings all, I have already searched the forums and found many different solutions on converting text. however I guess it may be pure user error on my part that is preventing it from working correctly. Here is the situation, I have a form which reads data from a database. I made buttons which are driven by cases to move between the records. The question is one of the fields needs to be converted to uppercase when it is displayed, how can I do this so that the field will ALWAYS be displaying everything in uppercase? I have already tried doing something like this:

txtField(1).Text = UCase(txtField(1).Text)

After every case event but i get an error which says:

key column information is insufficent or inncorect

Is there a way I simply make the textfield globally be upercase so not matter what happens whatever is displayed in the text box comes out uppercase?


Please help!

Thanks!

Check For Upper Case
Is there any way to have a script run through each letter in a text box and see if the letter is an Upper Case?

I've searched on here but didnt' find anything..

Converting To Upper Case
Need help!

I'm trying to make an object print in upper case using "with selection" from the word library. I need to make the frmCitation.cboRrank.Text print in upper case from this point instead of having the user enter the info in upper case. Here is a snippet of the code:

Public Sub Print()
ActiveDocument.PageSetup.TopMargin = InchesToPoints(3.875)
ActiveDocument.PageSetup.BottomMargin = 0

With Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.Font.Bold = 1
.Font.Size = 11.5
' name
.Font.Size = 15
.ParagraphFormat.SpaceBefore = 30
.Paragraphs.Format.Style
.TypeText Text:=frmCitation.cboRrank.Text & vbUpperCase & " " & frmCitation.txtRfirstname.Text & vbUpperCase & " " & frmCitation.txtRlastname.Text & vbUpperCase & vbCrLf

First Letter In Upper Case
i want a function in vb which will retrurn a string in first letter with uppercase and rest of characters in lower case
e.g.
"book" should return "Book"

Date In Upper Case
Hi all i have one question here..

I have textbox for DTPDate.How do i store this date into Access in Upper Case.


VB Code:
.Fields("Date") = UCase(txtDate.value)
I use the code above but not work.
I want to make it as 02-AUG-2006.

Let me know if there is a way..

Thanks in advance

Use Of Upper And Lower Case With ....
Hi there,

I like to use this code, but unfortunatly it lets me only use the Upper Case A to Z. If possible I would like to use the Lower case as well OR even better if choosing the first letter Upper Case the rest Lower case.

How would I incorperate this into these Case Select Statements ???


VB Code:
Public Function'---'--- Turn input to upper case only.    sTemp = UCase(Chr$(KeyAscii))         Case 0: 'Numbers Only, from 0 to 9.            Select Case sTemp                Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ""                    VI = Asc(sTemp)                Case Else                    VI = 0            End Select         Case 1: 'Characters Only, from A to Z.            Select Case sTemp                Case "A" To "Z"                    VI = Asc(sTemp)                Case Else                    VI = 0            End Select         Case 4: 'AlphaNumeric Only,...With Comma.            Select Case sTemp                Case "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ""                    VI = Asc(sTemp)                Case "A" To "Z"                    VI = Asc(sTemp)                Case Else                    VI = 0


Thanks in advance aktell

Input Upper Case Only
Hi everyone! Does anybody know how I could force the keystrokes being inputted into a textbox to be uppercase only??

Thanks...

Oliver

Upper Case In EXE Files
If fFile.FolderExists(App.Path & "Backup") = False Then
fFile.CreateFolder App.Path & "Backup"
End If

fName = Format$(Now(), "ddmmyy") & ".ric"

txtFPath.Text = App.Path & "Backup" & fName


this is how i am writing a line in text box on form load
when i make an EXE (not when i run my app from vb editior using 'F5') of it and run all the chars r in upper case
can any find any mistake

thanx

Make Upper Case
Is under VB a function with which I can make a string upper-case.
Thanks

How To Convert Upper Case Character To Lower Case Character?
Hi ,
I would like to know how to convert upper case character to lower case character. Because i am doing simple search engine. It has case sensitive.
For example, there has a keyword "Automation" in my databse, but if i type automation ,it could not be searched. just only can type Automation.
How can it automatically convert "A" to "a" then the rest of character remain the same?so that when i type automation ,it will be detected .Does anyone can help me? Can use If..Else method?



Regards,
xin xin

Changing Case To Upper AND Lower?
I'm having trouble changing case of a string that contians spaces.

For example:
String1 = "visual basic"
String1 = ucase(string1) - gives me "VISUAL BASIC"
String1 = lcase(string1) - gives me "visual basic"

But what I want is "Visual Basic"
It must be done with the chr conversion somehow.

Any help?
Thanks,
Bernie

Converting First Letter To Upper Case
Hi there.

I am trying to convert text in a box to upper case. I want it to convert only the first letter to upper case. I have succeded but the problem is this it puts the text back to front, for example:


lisa < - correct what you just typed

Asil < - VB conversion

This is the code:

Dim firstletter As String
Dim restfirst As String
Dim firststring As String

'Convert the text to upper case!
firststring = txtfirst.Text

If Len(firststring) > 0 Then
firstletter = UCase(Left(firststring, 1))
firststring = LCase(Right(firststring, Len(firststring) - 1))
firststring = firstletter & firststring
End If
txtfirst.Text = firststring


Any ideas on why it is doing this?

Please help.

Change To Upper Case During Drag
Hi,
I am still struggling with this problem. Sorry for posting it again. I need to change the character to upper case while dragging into txtReceiveCharacters. I have around twenty six labels (a-z) called label1 which makes this more interesting. The code below is what I have tried:

Public plstrDragCharacter As String

Private Sub lblCharacter_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
Select Case Button
Case vbLeftButton
lblCharacter(Index).Drag vbBeginDrag
plstrDragCharacter = lblCharacter(Index)
End Select
End Sub

Private Sub txtReceiveCharacters_DragDrop(Source As Control, X As Single, Y As Single)
txtReceiveCharacters = txtReceiveCharacters & plstrDragCharacter
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyShift Then
Dim Index As Integer
lblCharacter(Index).Caption = UCase(plstrDragCharacter)
End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyShift Then
Dim Index As Integer
lblCharacter(Index).Caption = LCase(plstrDragCharacter)
End If
End Sub

Thank you very much in advance
Andonny

Upper/Lower Case In Text Box
Greetings: Using VB6

Using VB6 SP6, I'm trying to create a subroutine whereby in a textbox
if a name is typed, it converts the first character to uppercase and the
remainig to lowercase.

I know I need the keypress event but i'm not having any success with
it. If use a command button It works.

I experimented with a second textbox and what seems to happen is that
it's always behind by one character. Ex If I type john in textbox1,
I get Joh in textbox2.

The following is the code I tried:


Code:
Option Explicit
Dim intsize As Integer

Private Sub Command1_Click()
intsize = Len(Text1.Text)
Text1.Text = StrConv(Left(Text1.Text, 1), vbUpperCase) & LCase(Mid(Text1.Text, 2, (intsize - 1)))
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
intsize = Len(Text1.Text)
Text2.Text = StrConv(Left(Text1.Text, 1), vbUpperCase) & LCase(Mid(Text1.Text, 2, (intsize - 1)))
End Sub

Bottom line I only want to use a single textbox. Can someone shed some
light on what I need to do?

Thanks for your responses

Searching With Upper Case Criteria
how do you make sure that if user types in the record search and the record was all in uppercase taht this wont give back no results.


e.g if i had a record in the database that is love and the user typed in LOVE how do you make sure that the database know its the same record????


here is my code in search
======
Private Sub cmdSearch_Click()
Dim search As String, found As Boolean

Call Load
'this calls the module load and opens the database
search = InputBox("Enter Customer Registration:")
'When the search command is initated a input box will be displayed in control by search

If search = "" Then
' If nothing is inputed in the inputbox a message will be displayed to type something
MsgBox "Please type something first.", , "Error Go Back"

Else
'the code for searching goes here, up to running the Select query
QryStr = "select * from customer where customer_rego = '" & search & "'"
Set Mainrst = indb.OpenRecordset(QryStr)

If Mainrst.BOF Then
'If the record is Before the beginning of file it will tell teh user that the Registration does not exist.
MsgBox "Search returned no results!", , "Error Go Back"
Else
Let txtR.Text = Mainrst!Customer_Rego
Let txtLName.Text = Mainrst!Customer_LName
Let txtName.Text = Mainrst!Customer_Fname
Let txtadd.Text = Mainrst!Customer_Address
Let txtS.Text = Mainrst!Customer_Suburb
Let txtP.Text = Mainrst!Customer_Pcode
Let txthp.Text = Mainrst!Customer_HPhone
Let txtmp.Text = Mainrst!Customer_Mphone
Let txtM.Text = Mainrst!Customer_Model
Let txty.Text = Mainrst!Customer_Make
Let txtd.Text = Mainrst!Des
Mainrst.Close
Set Mainrst = Nothing
End If
End If
End Sub
========
thanks

Upper Or Lower Case Recognition Help.
Sorry, I couldn't find this in the searches. I'm taking Computer Programming in school for the first year and it's in Visual Basic 6, and with the end of the semester coming up, we've been given an assignment as a final, make a program to do anything you want, show off what you've learned in the class. So, I'm making a program that solves Monohybrid and Dihybrid Punnette Squares. I've been all good up until now.

I need to be able to tell if one letter is upper or lower case, seeing as how you can use any letter in a punnette square.

So, I want to know if the letter in label1 is capital or lower case, but I don't know what the letter is, is that possible or am I on a wild goose chase and I'll have to go through and do "If label1.caption = "a".... If label1.caption = "z""?

Upper Case Function In Excel
I want to have the text entered in my column to automatically convert to uppercase. I'm trying to do this with a custom type but I can't get the text formatting corret. This is an example of the custom type... _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_). This last bit _(@_) is for the text and the function is UPPER("") but I can't seem to get it all together. Anyone got an idea how to do this?

Textbox Upper/Lower Case
Im trying to make it so that when someone enters something like this into a text box "hello how are you today" it then becomes "HeLlO HoW ArE YoU ToDaY" every first character becomes uppercase.

Any Ideas?

thanks

How To Know If A Character Is Upper Or Lower Case?
In VB, how can I tell if a character is Upper or Lower case?

String Help (lower And Upper Case)
I have a bot for this chat program and I was wondering if there was a way to make the bot recognize the command, no matter what case (upper or lower) it was.
For example: If Text = "hello" then
sendtext "hi are you doing?"
end if

But I want to make it so that i would respond if some1 said Hello or HeLLo, etc. Any help is appreciated.

How Do You See If Letter Is Upper Case Or Lower?
I need a way to check if a character is upper case or lower case or is there a way in vb to reverse the case of a string like if it were

hELLO it would change to Hello
?
and vica versa

MC Access - Searching By Upper Case
Hi all!
 I have a query in Access that returns Data in Upper and Lower Cases.
How do I select only those records that have Ucase only? Should I use a function in a Criteria line, create another column and code there?????

Thanks



be optimist and enjoy your life

Upper And Lower Case Letters
I need to know the code for making any first and last name/ uppercase the first letter and the rest lowercase. I need this code to use Ucase and left, right, mid.. Can anyone help. Thanks

Datagrid - Column To Upper Case
I am new to Visual Basic 6 and trying to work with the DataGrid control.
I want to have the user's column information for certain columns become Upper case if they type in a lower case letter.

I have tried the following below:


Private Sub grdSupplier_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)
Select Case ColIndex
Case 6, 11 To 14
grdSupplier.Columns(ColIndex).Value = UCase$(grdSupplier.Columns(ColIndex).Value)
Case Else
End Select
End Sub

When I change a column to "f" for example, I want to see "F" after the user moved to another column or presses <Enter>.

Thanks for your time.

Scott

Validating A Text Box +changing To Upper Case
Hey
I am wondering how to validate a text box to search for car registrations in the form
AB 12 CDE
also changing the letters [if typed in lowercase] to uppercase. I have this so far
Private Sub Txtcustomercarreg_Validate(Cancel As Boolean)
Dim FirstChar As String * 1
FirstChar = Left(txtcustomercarreg.Text, 1)
Select Case FirstChar
Case Chr(48) To Chr(57), Chr(65) To Chr(90)
regfind 'this searches the registration after the text has been validated
Case Else
MsgBox ("Please use capital letters and make sure the registration is in the form of AB 12 CDE")


End Select

End Sub

Making The First Letter Of A String Upper Case
I need to make a string's first character Uppercase..how can i do that?

Upper Case Of Watever Alphabet Key Is Pressed.
hi,
Is there any way in which no matter watever alphabet is entered in a text box ,it displays the uppercase of the text.
i.e. no matter wat key is pressed only the uppercase of it gets entered!
am stumped,
thankx in advance.

Textbox Upper And Lower Case String
Hi, im trying to make sort of a command prompt type interface for my program, i want it to be able to recognise the command typed in even when its in uppercase, lowercase, or a mixture of both.
im using a multiline textbox, at the moment the code to display a list of commands is this:

[vb code start]
If txtDebug.Text = "help" Then
txtCommand.Text = txtCommand.Text + ("...:::{ Available Commands }:::..." _
+ Chr(13) + Chr(10))
End If
[vb code end]

as you can see, it will only accept the command help in lowercase, so can anyone tell be how to change this, or even make the textbox so it can only type in lowercase.
thanks alot

App.EXEName And App.Path Returning All UPPER CASE In EXE
Hey Everybody,

I'm encountering an annoying problem with App.Path and App.EXEName. It seems that when in the development environment, these values are in the correct case, but when running from a compiled EXE, these values are suddenly all UPPER CASE. For instance, if my application is located here:

"C:StuffWaCkYLocation"

In the development environment, App.Path returns:

"C:StuffWaCkYLocation"

But after compiling an EXE and running that, App.Path now returns:

"C:STUFFWACKYLOCATION"

Things still work (as long as you allow for the difference when doing comparisions), but for display purposes this is ugly and inaccurate. Does anyone know why this happens and/or how to make it work properly?

Thanks,
-JoeyCode

Printer Devicename - Can Change To Upper Case?
One of my printers in my printer.devicename call returns in lower case. Is
it possible for me to change it to upper case? I am also wondering how, in
the first place, this particular printer devicename is coded in lower case?
Is there a way to change it back using VB6?
Thanks

Allowing Only Numbers And Upper Case Alphabets
Friends,

I am using vb6 and sql server 7.


I have a textbox which accepts input from user
for field heatno (varchar type).

I want to allow user to enter only number and
upper case of alphabets to textbox.

(ie)100,101,101A,102,102A,102B,102C ....etc

If user enter 101`,101a,102a,102b,102*.... etc
  textbox should not accept the value.



Help me to do this

cthirus

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