Default values?

  • Thread starter Thread starter Lovelock, David
  • Start date Start date
L

Lovelock, David

I have the attached spreadsheet that I want to make all of the fields i
Yellow default to zero each time the user opens the sheet. In addition
I want to make each of the drop down boxes default to the answer NONE
Does anyone have suggestions? I thought If I saved the sheet as
template that would do it, but I have not had luck with that

+----------------------------------------------------------------
| Attachment filename: for_posting.xls
|Download attachment: http://www.excelforum.com/attachment.php?postid=366452
+----------------------------------------------------------------
 
What does "I have not had luck with that" mean?

Using the template will cause the newly created sheet to have the
same values as the template the first time the sheet is opened.

Did you open the template itself instead of creating a new file
based on the template?

If you want each worksheet to default to those values each time it's
opened, you'll need to use an event macro. For instance, you can put
this in the ThisWorkbook code module (right-click the workbook title
bar and choose View Code) (I didn't open your workbook, for a number
of reasons, so this is just an illustration):

Private Sub Workbook_Open()
With Sheets("Sheet1")
.Range("A1:A10,B2,J45").Value = 0
.Range("B3,D4,E5,K123").Value = "None"
End With
End Sub
 
I did open the template itself instead of creating a new file from the
template, which apparently is not the correct way to do this.

I will try your code suggestion and see if I can make that work for my
workbook. Thank you for your help.
 
Back
Top