Clearing Form / Showing message that data was stored


Good Evening,

I wonder if you can help me in order to have the additional part of the macro that you create called (Input Form to Get Data and Store it in Another Tab in Excel), as you mentioned at the end of this macro I would like to have the instructions in order to: Clearing the form when a successful entry has been made and showing an output message that the data was stored.

I'm copying below the VBA macro that you wrote for reference,

Thanks in advance for your help!

Sub data_input()
ws_output = "Data"
next_row = Sheets(ws_output).Range("A" & Rows.Count).End(xlUp).Offset(1).Row
Sheets(ws_output).Cells(next_row, 1).Value = Range("first_name").Value
Sheets(ws_output).Cells(next_row, 2).Value = Range("last_name").Value
Sheets(ws_output).Cells(next_row, 3).Value = Range("email").Value
Sheets(ws_output).Cells(next_row, 4).Value = Range("account").Value
End Sub
Post Edited
CODE Tags: You must add [CODE][/CODE] tags around your code! (click the CODE button to do this when creating a post)



To clear any cell on the current worksheet, use this code:

Range("A1").Value = ""

Change A1 to the desired cell reference and input this line as many times as is needed.


Answer the Question

You must create an account to use the forum. Create an Account or Login