View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Otto Moehrbach
 
Posts: n/a
Default Run Macro(save workbook) after cell updated

The following macro will do what you want. Note that this macro will save
the workbook (file) whenever the contents of ANY cell in Column A of ANY
sheet in the workbook changes. If you want this to apply to only some of
the sheets, you will have to add an IF statement or modify the one that is
there to exclude certain sheets.
Note that this macro is a workbook event macro. That means it has to be
placed in the workbook module. To access this module, right-click on the
Excel icon that is to the left of the word "File" in the menu line across
the top of the screen display, select View Code, and paste this macro into
that module. Please post back of you need more. HTH Otto
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 1 Then
ThisWorkbook.Save
ThisWorkbook.Saved = True
End If
End Sub

"titch" wrote in
message ...

Hello I need a way of saving a workbook after I input something(a user
name) into a cell in column A. I have recorded a macro to save the
workbook I just need it to run when I update one of the cells. There is
a total of 22 worksheets I have to apply this to so f there is a quick
way of apply it to all the sheets that would be even better.

Thanx

Titch


--
titch
------------------------------------------------------------------------
titch's Profile:
http://www.excelforum.com/member.php...o&userid=31190
View this thread: http://www.excelforum.com/showthread...hreadid=508603