Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Next time sheet is touched, remove items from cells?
I had this before and did not get any takers. I think the chalenge is more
getting to do it once and not to check each time? ============= Not sure how to do this, but I have a sheet that I have a macro export data and update a field to say processed in cell F5. I want to know if there is a way to remove that if someone does anything to the sheet like update a description or update numbers. This is more a control thing so I know that the file will match the export and if someone updates something on the sheet, then the word "processed" in cell F5 will be gone. thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Next time sheet is touched, remove items from cells?
Here is some code that you can put in the sheet. Right click the sheet tab
and select view code. Paste the following: Private Sub Worksheet_Change(ByVal Target As Range) Range("F5").Value = "" End Sub Whenever anything is changed on the sheet it makes Cell F5 = "". Note that you may need to do some work on your existing macros as they will be making changes to the sheet and causing this code to fire. In that case you will need to turn events off while that procedure runs and back on when it is finished... Application.enableevents = false 'your import code Application.enableevents = true -- HTH... Jim Thomlinson "Don" wrote: I had this before and did not get any takers. I think the chalenge is more getting to do it once and not to check each time? ============= Not sure how to do this, but I have a sheet that I have a macro export data and update a field to say processed in cell F5. I want to know if there is a way to remove that if someone does anything to the sheet like update a description or update numbers. This is more a control thing so I know that the file will match the export and if someone updates something on the sheet, then the word "processed" in cell F5 will be gone. thanks in advance |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Next time sheet is touched, remove items from cells?
Sheet event code to clear F5 if any cell other than F5 is changed.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$F$5" Then On Error GoTo endit Application.EnableEvents = False Me.Range("F5").Value = "" End If endit: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Fri, 15 Aug 2008 09:59:02 -0700, Don wrote: I had this before and did not get any takers. I think the chalenge is more getting to do it once and not to check each time? ============= Not sure how to do this, but I have a sheet that I have a macro export data and update a field to say processed in cell F5. I want to know if there is a way to remove that if someone does anything to the sheet like update a description or update numbers. This is more a control thing so I know that the file will match the export and if someone updates something on the sheet, then the word "processed" in cell F5 will be gone. thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to remove duplicated items from a list? | Excel Worksheet Functions | |||
Remove Hyperlinks from multiple cells at the same time | Excel Discussion (Misc queries) | |||
Remove Excel Menu Items | New Users to Excel | |||
how do I set up time sheet and items bought expense sheet | Excel Discussion (Misc queries) | |||
how do i remove the cells from a sheet when working with a chart | Charts and Charting in Excel |