Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

INITIALIZE Worksheet

  Asked By: Geeske    Date: Jan 19    Category: MS Office    Views: 1696
  

I have a 3/sheet workbook, sheet 1 used to quote pricing, has about 15
fields I need to set to blank or zero when workbook is loaded. Can I
initialize Sheet 1 only with a VBA script.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Archer Smith     Answered On: Jan 19

Yes.

(But the question seems so rhetorical, I wonder if there is some subtlety that
I'm missing. Like to give a little more detail?)

 
Answer #2    Answered By: Ida Andrews     Answered On: Jan 19

Create a Module with

Sub Auto_Open()
'initialize Cells A1 thru A15 to blank
Sheets("Sheet1").Range("A1:A15").Value = ""
'initialize Cells B1 thru B15 to zero(0)
Sheets("Sheet1").Range("B1:B15").Value = 0
'initialize Cells A20 thru B40 to blank
Sheets("Sheet1").Range("A20:B40").Value = ""
'initialize Cells C20 thru D40 to zero(0)
Sheets("Sheet1").Range("C20:D40").Value = 0
End Sub

 
Didn't find what you were looking for? Find more on INITIALIZE Worksheet Or get search suggestion and latest updates.




Tagged: