gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
I want the vba code that will put the last date I clicked on a form button into F3 in…
- User
I want the vba code that will put the last date I clicked on a form button into F3 in the following format 'Last Update ddd/mmm/yyyy'
- Assistant
You can use the following VBA code to achieve your requirement:
Private Sub CommandButton1_Click() Range("F3").Value = "Last Update " & Format(Date, "ddd/mmm/yyyy") End SubMake sure to replace "CommandButton1" with the actual name of your form button. This code should be placed within the code module for the form containing the button.
Whenever the button is clicked, it will update the value of cell F3 with the current date in the format "Last Update ddd/mmm/yyyy".
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.