Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating a Worksheet? Kenny R Excel Discussion (Misc queries) 3 December 8th 06 05:15 PM
Worksheet activating JamesM[_2_] Excel Programming 0 September 28th 04 04:34 PM
Worksheet activating JamesM Excel Programming 0 September 28th 04 03:55 PM
Running Event Procedure When Cell Updated on Excel Worksheet Tom Ogilvy Excel Programming 0 August 19th 04 03:38 PM
Activating a worksheet DJH Excel Programming 2 August 10th 04 04:20 PM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"