From: Dan Wood on
How does this work? How do i make it as an event macro?
From: Reg on
copy it as written into 'thisworkbook' section
(without the dashes lol)

its an event macro because it triggers on an event - in this case
worksheet_change so every time that event happens this code will run,

it checks if anything in column c changed (intersect(target,[C:C]) is
nothing) and if it has clear columns(5) (which is e)

"Dan Wood" wrote:

> How does this work? How do i make it as an event macro?
From: Dan Wood on
It doesn't seem to be working at the moment. I have copied it into the This
Workbook section, and moved the other macro into the Sheet1 section.

Is this something obvious i am doing wrong? Do you need to see both bits of
code?
From: Reg on
yeah, sorry - I responded to your question without looking at micky's code

the following works for me (when placed in thisworkbook)

Private Sub Workbook_sheetChange(ByVal sh As Object, ByVal Source As Range)
If Application.Intersect(Source, [C:C]) Is Nothing Then Exit Sub
Columns(5).ClearContents
End Sub

hth
RegMigrant
"Dan Wood" wrote:

> It doesn't seem to be working at the moment. I have copied it into the This
> Workbook section, and moved the other macro into the Sheet1 section.
>
> Is this something obvious i am doing wrong? Do you need to see both bits of
> code?
From: Dan Wood on
That works to clear the entire column, but isn't quite what i need.

The sheet is to store passwords, then there is a macro to add appointments
into outlook for the date the password needs changing. Therefore, in column
'A' starting at row 9 there is a list of system names. Then in column 'D'
starting in row 9 again is the date that the password expires, and this is
added to the calendar. Column 'E' is simply there as a way to stop duplicate
entries in the calendar. So what i want is for example if the system in A12
password expires, it will then be changed and the new expiration date will be
input into D12, so i only want E12 to be cleared.

Is there some way to do this, or is it to complicated?

Thanks for your help