+ Reply to Thread
Results 1 to 3 of 3

Activating a Procedure in an Excel Worksheet

  1. #1
    alathosco
    Guest

    Activating a Procedure in an Excel Worksheet

    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



  2. #2
    Dave Peterson
    Guest

    Re: Activating a Procedure in an Excel Worksheet

    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.

    alathosco wrote:
    >
    > 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


    --

    Dave Peterson

  3. #3
    alathosco
    Guest

    Re: Activating a Procedure in an Excel Worksheet

    Thank you!!! It worked like a charm!

    "Dave Peterson" wrote:

    > 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.
    >
    > alathosco wrote:
    > >
    > > 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

    >
    > --
    >
    > Dave Peterson
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1