![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Hi again,
I have the following code: Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column = 1 Then If Target = "x" Or Target = "X" Then Target.Offset(0, 7) = Date Target.Offset(0, Else Target.Offset(0, 7) = "" Target.Offset(0, End If End If End Sub Which populates the Date and username when a user puts an x in column 1. This works fine, but i also have a macro that cuts and pastes rows and clears the x. When i run the macro, i get a type mismatch error. Im sure its because the macro is clearing the x. How do i get around this? can i maybe disable the worksheeet_change when i run my other macro? Thanks Note, those are not really [ This Message was edited by: robfo0 on 2002-03-10 19:05 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
In the other routine put
Application.enableevents = False before it starts THEN @ the end of the routine Put in Application.enableevents=true This will disable the events incase your routine IS ?? within the range. Ivan |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Thanks! works perfectly
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|