If Target.Count > 1 Then Exit Sub
This means that if you change more than one cell at the same time, do
nothing.
If Target.Column = 1 Then
If the change is in Column A, do what follows. B is 2, C is 3, etc.
ThisWorkbook.Save
Save the workbook
ThisWorkbook.Saved = True
When you save a workbook manually, the file is saved and it is flagged as
being saved. Not so when you save by VBA. It is just saved. If you were
to close Excel after that, you would get a query box asking if you want to
save the file.
This statement says to flag the file as Saved.
HTH Otto
"titch" <titch.22rem0_1139148003.3955@excelforum-nospam.com> wrote in
message news:titch.22rem0_1139148003.3955@excelforum-nospam.com...
>
> That worked a treat.
> is there anychance you can explain whats going on in the code(line 4-7
> are easy i know). I don't fully understand whats going on in the first
> 3 lines. Specificaly what would I change if it was column B, I think I
> have a fair idea but it is always good to know exactly what is
> happening.
>
> Cheers
>
> Titch
>
>
> --
> titch
> ------------------------------------------------------------------------
> titch's Profile:
> http://www.excelforum.com/member.php...o&userid=31190
> View this thread: http://www.excelforum.com/showthread...hreadid=508603
>
Bookmarks