All Caps

S

scottnshelly

I want whatever the user puts into the text boxes to be in Caps.
don't care when it changes, whether when they type it, before it goe
into the cell or whatever, just as long as at the end of the da
everything in columns A and B are in all caps.
Thanks
 
D

Don Guillett

try this in a before_close event in the ThisWorkbook module

Sub uscaseAandB()
mr = Columns("a:b").Find("*", searchdirection:=xlPrevious).Row
'rest is mostly McRitchie
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cell In Range("a1:b" & mr)
If cell.HasFormula = False Then
cell.Value = UCase(cell.Value)
End If
Next cell
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
 
D

David McRitchie

The poster asked for text boxes not cells.

Putting things in all caps that should not be in caps is about as
unprofessional as you can get for an appearance.

KB 152379 - How to Copy the Text Within a Text Box to a Cell
http://support.microsoft.com/?kbid=152379
( you can Google kbid=152379)


Here is a regular macro to change text to all capitals in the textboxes
of the active worksheet.

Sub KinderTextboxCaps()
Dim tbox As TextBox
For Each tbox In ActiveSheet.TextBoxes
tbox.Text = UCase(tbox.Text)
Next tbox
End Sub


This is an Event macro (install with right on sheet tab, view code, ...)
that will change to caps upon selection of the worksheet.

Private Sub Worksheet_Activate()
' change all textboxes on the page to caps
' upon worksheet activation. DMcR 2004-07-15
Dim tbox As TextBox
For Each tbox In ActiveSheet.TextBoxes
tbox.Text = UCase(tbox.Text)
Next tbox
End Sub

has been added to:
InputBox, MsgBox and TextBox
http://www.mvps.org/dmcritchie/excel/inputbox.htm
 
D

David McRitchie

Interesting in rereading the posting by Scott n' Shelly said "text boxes" but
indicates Columns A and B.

I think there may be a problem in terminology here and Frank and Don may
be clairvoyant. If it is to be text boxes and column A & B it would have to
be know which corner of a textbox is to be checked if it is in Col A or Col B.

Help > answer wizard > textbox > Add a text box to a chart (or to a worksheet)
[/QUOTE]
 
F

Frank Kabel

Hi David
and only the OP knows <vbg>

I first also thought the OP meant real rextboxes but seeing this column
A, B statement I assumed the OP simply misspelled :)
 
S

scottnshelly

Sorry for the confusion,
The userform has two textboxes. the info from textbox1 goes int
column A, textbox2 to column B. I don't care where the text get
converted to uppercase, as long as by the end of the day everything i
columns A and B are in uppercase. i don't care about professionalis
on this workbook.
In summation, It doesn't matter if the text is converted to uppercas
in the textboxes, or in the cells. either one would be fine. jus
help me make everything uppercase.
Thanks
 
D

David McRitchie

Then you already have your answer from any of the three responses.
Don't you?
 
S

scottnshelly

yea, i got it to work now! thanks for everyone's help. hey, sinc
you're reading this... what is the correct code for 'make checkbox1 b
checked when the userform initializes?

userform_initialize
checkbox1.value = true

doesn't work, i think i'm close though or something
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top