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

Chip, Tom,

Many thanks for your help. All seems to be working OK now.

"Tom Ogilvy" wrote in message
...
The code Chip Provided should go in the Sheet module where you want the
behavior. Right click on the sheet tab and select view code. Paste in
Chip's code.

Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
Michael,

Try something like the following:


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$B$14" Then
If IsNumeric(Target) Then
MsgBox ("Enter your comments here")
Application.EnableEvents = False
Target.ClearContents
Target.Select
Application.EnableEvents = True
End If
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Michael Beckinsale" wrote in
message ...
Hi,

I have written the following code and tried placing it in a

Module,
ThisWorkbook and Sheet1 and it will not work at all. Can abybody

tell me
what l am doing wrong ?

I want to stop the using entering numeric values in the cell B14

of Sheet1.

When l get the procedure to work l will want it to work on a

merged cell
range and then call a subroutine.

Anty help greatly appreciated.

Regards

Michael Beckinsale




Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target.Address = "$B$14" Then
If IsNumeric(Target) Then
MsgBox ("Enter your comments here")
Range(Target).ClearContents
End If
End If


End Sub










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
Worksheet_Change Event with Range Protection Judy P. Excel Discussion (Misc queries) 3 October 28th 10 08:07 PM
Disabling WORKSHEET_CHANGE event Jase Excel Discussion (Misc queries) 1 April 25th 08 04:32 PM
Worksheet_change event handler error gen Excel Discussion (Misc queries) 0 January 18th 08 04:55 AM
Controling the Worksheet_Change Event? DCSwearingen Excel Discussion (Misc queries) 3 May 25th 06 08:32 PM
In the worksheet_change event, how do I determine what occured? Tim Patton Excel Worksheet Functions 6 November 3rd 05 08:38 PM


All times are GMT +1. The time now is 11:49 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"