Visual basic code not working....

  • Thread starter Thread starter Shhhh
  • Start date Start date
S

Shhhh

Hello all,

I'm using microsoft office 2007. Running a workbook with the following
VBA Code...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Application.Intersect(Target, Range("B4, I4,K4,A23, A38, H23,
H38")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
End Sub


however when I input any data into those target cells, they do not
become capitalized as is specified? What could be wrong?

Thank you all for your help!

Shhhhh
 
The code works fine. Did you put the code in the appropriate worksheet code
module?
 

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

Back
Top