Save on change

  • Thread starter Thread starter Birdy
  • Start date Start date
B

Birdy

Hello

I want to save a worksheet to another workbook when there is a change in a
cell on sheet 1 range(a7:c300)
If the workbook to save already exists then overwrite workbook with new
values.

Thanks Birdy
 
Birdy,

This code in the worksheet code module will do it (although it could get a
bit CPU heavy!)

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Range("A7:C300")) Is Nothing Then
ThisWorkbook.Save
End If
ws_exit:
Application.EnableEvents = True
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top