Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Will need to use visual basic. Open the VBE (Alt+F11) and in the project
explorer box (usually top-left) double click on the ThisWorkbook module. Paste the following in, and then modify accordingly: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) 'Define the sheet your values are on With Sheets("Sheet1") 'Define Ranges as appropriate ..Range("A1").Value = .Range("A3").Value ..Range("A2").ClearContents End With End Sub Close out the VBE, and you should be good to go. Macro will activate when you save. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "MitzDriver" wrote: I have a worksheet that has a simple formula. In a1 is xxxnumber, a2 is xxxnumber in a3 is =a1+a2. When i close the workbook I need to save the value in a3 so that when i reopen the workbook, a2 is blank and a1 contains the value from a3 in the previous workbook. Hope that made since. Thanks for any suggestions. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving a value in another cell | Excel Worksheet Functions | |||
Help with saving from a cell | Excel Programming | |||
Saving with a filename already in a cell | Excel Programming | |||
Saving a file with a name from a cell value. | Excel Programming | |||
Saving a file with a name from a cell value. | Excel Programming |