Activating a Procedure in an Excel Worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello...
I've created a procedure called Force_UCase in the VBE using the often
copied example code shown below.
How do I get it to now perform in my spreadsheet?

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("B19:B60")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub
 
Copy your code from the VBE.
Back to excel
right click on the worksheet tab that should have this behavior
select view code
Paste your code there.

(and clean up the code from its other spot.)

This kind of event code goes behind the worksheet that needs the fix.
 
Thank you!!! It worked like a charm!

Dave Peterson said:
Copy your code from the VBE.
Back to excel
right click on the worksheet tab that should have this behavior
select view code
Paste your code there.

(and clean up the code from its other spot.)

This kind of event code goes behind the worksheet that needs the fix.
 

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