Macro to Reset data input form

M

MichaelRobert

I have a worksheet set up as a data entry page to allow customers to select
features in a product. This data then generates a part number to capture that
particular set of features.

However, this leaves me with the Data Input form populated with the last
customer's selections. How can I write my macro to Reset the form to the
'blank' starting position? I envision having a 'Reset' box in the worksheet
to cue the Macro.

Thanks.

Mike
 
P

Paul C

Write the start of your macro first on a module sheet. You can write the
whole thing or start with one line and add additional lines later.

Sub Resetform()
Range("A1").ClearContents
......
(add cells as needed)
End Sub

Using ClearContents will leave formatting and validations intact

Make the reset box a Form Control command button and link it to this macro.
 
M

MichaelRobert

Many thanks, Paul C.

Mike

Paul C said:
Write the start of your macro first on a module sheet. You can write the
whole thing or start with one line and add additional lines later.

Sub Resetform()
Range("A1").ClearContents
.....
(add cells as needed)
End Sub

Using ClearContents will leave formatting and validations intact

Make the reset box a Form Control command button and link it to this macro.
 
M

MichaelRobert

The ClearContents command works fine in clearing the form. But ideally the
result of the 'Reset' will be to populate each of the cleared cells (Range
b9:c15) with the word 'Empty'.

Is their a command to specify the content of cells?

Thanks.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top