question

  • Thread starter Thread starter Mauro
  • Start date Start date
M

Mauro

I have this sheet. All data is input through an userform. I now need to make
sure that data is not input twice... I mean... it can be input twice but I
need to send a warning to the operator and I need both identical lines to be
shown (in an userform?) with the choice to
a. accept the input
b. delete one of the 2 entries

to avoid problems I would like to know if it is possible to format the cells
in the sheet so that no matter what the operator writes the caracters are
always capital....

I hope I make any sense....

thanks
 
A better subject line will get more answers but YES, you may use a
worksheet_change event to do this. right click sheet tab>view code>copy
paste this>modify to suit>SAVE
Now, as written, if in col A and below row 2 the first will be capitalized

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 3 Or Target.Column <> 1 Then Exit Sub
Application.EnableEvents = False
If Target.HasFormula Then
Target.Formula = Application.Proper(Target.Formula)
Else
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub
 
Hello Don,
I've done all you told me to but it didn't work... nothing changes... I need
to make sure that all the letters are capitalized starting from row 2 (row 1
is the header)....

sorry for posting in both groups but I didn't know they were....
connected....

thanks
 
I've done all you told me to but it didn't work
Apparently not. Did you put in a SHEET module as instructed.
Now, as written, if in col A and below row 2 the first will be capitalized
If Target.Row < 3 Or Target.Column <> 1 Then Exit Sub
for row 2 and ALL columns, change to
If Target.Row < 2 Then Exit Sub

As written, it does the same as =proper() or aaa bbb becomes Aaa Bbb
to have all AAA BBB, then change to

If target.HasFormula Then
target.Formula = UCase(target.Formula)
Else
target.Value = UCase(target.Value)
End If
Next
 
Back
Top