Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet_change

Hi

I wanted to have a worksheet change event whenever I change a cell in
certain column (say column B) to something else the event would happen
I figure this

Private Sub Worksheet_Change(ByVal Target As Range)

????

If ????? and Target.Column = 2 then
Application.EnableEvents = False
Code, code
End if

Application.EnableEvents = True

End Sub

Thanks.
B

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Worksheet_change

How about:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("b:b")) Is Nothing Then Exit Sub

On Error GoTo errHandler:

'do lots of stuff
Application.EnableEvents = False
'change some stuff.




errHandler:
Application.EnableEvents = True

End Sub

"rickey24 <" wrote:

Hi

I wanted to have a worksheet change event whenever I change a cell in a
certain column (say column B) to something else the event would happen.
I figure this

Private Sub Worksheet_Change(ByVal Target As Range)

????

If ????? and Target.Column = 2 then
Application.EnableEvents = False
Code, code
End if

Application.EnableEvents = True

End Sub

Thanks.
Bo

---
Message posted from http://www.ExcelForum.com/


--

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
Sub Worksheet_Change Matt Excel Discussion (Misc queries) 3 November 16th 07 04:40 PM
Worksheet_Change help Soundman Excel Discussion (Misc queries) 3 June 30th 06 10:46 PM
Worksheet_change won't run Eric Excel Discussion (Misc queries) 4 March 10th 05 03:43 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 10:24 AM.

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"