Forum Discussion
formula and code
hello every one,
I need help on how to include formulas in the code for a save button.
Thank you very much in advance
2 Replies
- NikolinoDEPlatinum Contributor
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 SubReplace '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_MKCopper 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.