Thread: Save on change
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Save on change

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)

"Birdy" wrote in message
.nl...
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