Some help needed

P

propolis

Hi,

I have a row that calculates various results. The user inputs th
choices from a cell that has validation.

Now when the row has been completed, you have a total which is fine.

Now, when you open the workbook again, the previous selected option
are still there (user selected). When you clear these maually, I ge
#VALUE! in the cells with formulas.

How do I prevent the error from showing up.

Also, how can I make the sheet have a reset option or when it open
all user input fiels will be zero

:
 
B

Bob Phillips

Test for a blank in your formulae

=IF(cell="","",your_formula)

And to initialise

Private Sub Workbook_Open()
With Worksheets("Sheet1")
.Range("A1").Value = ""
'etc
End With
End Sub

'To add this, go to the VB IDE (ALT-F11 from Excel), and in
'the explorer pane, select your workbook. Then select the
'ThisWorkbook object (it's in Microsoft Excel Objects which
'might need expanding). Double-click the ThisWorkbook and
'a code window will open up. Copy this code into there,
'changing the caption and action to suit.


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Top