LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Problem w/ worksheet change event

Hi all. I have the following inside a worksheet change event:
'Lock/Unlock cells based on FT/PT status
If .Column = 5 And .Row 11 And .Row < 312 Then
Application.EnableEvents = False
If .Value = "PT" Then
Cells(.Row, 6).Value = 20
Else
Cells(.Row, 6).Value = 40
End If
Application.EnableEvents = True
End If

I the user highlights and clears contents of column 5 and 6 at the same time
(ie E5:F5), I get a type mismatch error on the line If .Value = "PT" Then,
and the change event won't fire unless I completely clode out of excel and
re-open. Any ideas on how to prevent that from happening?


 
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 Problem tim Excel Programming 9 March 28th 05 08:37 AM
Worksheet Row Change event crazybass2 Excel Discussion (Misc queries) 4 December 8th 04 05:29 PM
Worksheet Change event Libby Excel Programming 2 October 26th 04 12:02 AM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


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

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

About Us

"It's about Microsoft Excel"