Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save sheet when cell value changes
Cam.,
Haven't tried this as I don't have IIS and ASP on this machine, but this worksheet event code will force a save when a cell changes, but what I don't know is if your web update will force this event. Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False On Error GoTo ws_exit ThisWorkbook.Save ws_exit: Application.EnableEvents = True End Sub If you want to only do the updates on changes to certain cells, try this mod for example Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False On Error GoTo ws_exit If Not Intersect(Target, Range("A1:M100")) Is Nothing Then ThisWorkbook.Save End If ws_exit: Application.EnableEvents = True End Sub What worries me is what happens if the web update flods the page with changes? Each cell change will trigger a workbook save, and what happens to the outstanding updates. Anyway, try it and see. -- HTH Bob Phillips "Cam" wrote in message ... OK, I have a workbook with several sheets, one sheet takes input from a .asp web page and updates other sheets based on the values. I DESPERATELY need to save the workbook evertime a cell value changes (from the .asp web page input) as currenlty the update occurs but will not save before the next entry is made from the .asp page. THANKS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
a Macro to "save as" filename from a cell on the sheet and then pr | Excel Discussion (Misc queries) | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
How to save only row changes to a new sheet | Excel Discussion (Misc queries) | |||
save as w/sheet | Excel Discussion (Misc queries) | |||
Save sheet? | Excel Worksheet Functions |