Forum Discussion

2 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Hala_MK 

     

    Private Sub btnSave_Click()
        ' Your code here
        ' Example: Save the workbook with a specific file name
        ThisWorkbook.SaveAs "C:\Path\To\Your\File.xlsx"
    End Sub

     

    Replace 'Your code here' with the specific formulas and code you want to execute when the Save button is clicked. In the example provided, it saves the workbook with a specific file name.

     

    If this is not what you are looking for, please provide detailed information such as Excel version, operating system, storage medium, existing VBA code, etc. A file or photos would also be beneficial.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

    Was the answer useful? Mark them as helpful and like it!

    This will help all forum participants.

    • Hala_MK's avatar
      Hala_MK
      Copper Contributor

      NikolinoDE Thank you very much for your reply
      I am sorry, my question lacked a lot of details
      I am using excel version 2308 on windows 10
      I am trying to create a data entry form with a save button to save entered data to another sheet in the same workbook.

      I am still a beginner, I was able to save normal data, but I get an error when I do the same for formula.

      I attached the workbook.

Resources