SAVE BUTTON - save data that is typed into non formula cells

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • SAVE BUTTON - save data that is typed into non formula cells

    Hi *,

    I'm accessing and writing to PALO through an Excel interface. Unfortunately, there is no UNDO function available but I wanna avoid unwanted data entries or and data losses... One way to solve the problem is to work with some VBA. I found this quote in another thread:

    *QUOTE BEGINS - USER: h_decker*
    one solution is to let users enter values in non-formula cells and perform writeback in (hidden) PALO.SETDATA-formulas. One nice thing about this is that you got the possibility to create a kind of "Save" button that recalcs the sheet and triggers the SETDATA-formulas.

    Greetings from cologne
    Holger

    *QUOTE END*

    A save button is really what I need in this situation. Has anyone implemented something like this?

    Regards,
    Steve

    The post was edited 1 time, last by ssauerw ().

  • RE: SAVE BUTTON - save data that is typed into non formula cells

    Hi,
    first of all turn of automatic calculation. You can do e.g. in in Workbook-Open event:

    Private Sub Workbook_Open()

    Application.Calculation = xlCalculationManual

    End Sub

    Place a button on your sheet(s) and attach the follwoing VBA to its click-event:

    Example:

    Private Sub CommandButton1_Click()

    ActiveSheet.Calculate

    End Sub

    Whenever Button is clicked PALO.SETDATA-Formulas are executed due to calculation of your sheet.

    Hope this helps.

    Holger
  • RE: SAVE BUTTON - save data that is typed into non formula cells

    Thanks Holger,

    this should work just fine. Did anyone implement a "real" undo function. I guess, you need some extensive VBA-programming but it should work. Something like this:

    1.) when a cell in a predefined input array is edited -> copy value into a cache. (maybe all dimension attributes)
    2.) put this on Application.OnUndo
    3.) call a procedure and execute a setdata statement


    just a rough draft...
    Any comments more than welcome!

    Steve