Reseting to 0.

  • Thread starter Thread starter GEM
  • Start date Start date
G

GEM

Is there a way to reset a specific cell to 0 every time the file is opened??
 
You can use a macro -- but that would only work if macros are enabled by the
user.

Option Explicit
Sub Auto_Open()
thisworkbook.worksheets("Somesheetnamehere").range("x99").value = 0
End sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 
hi
in it simplest form..
Private Sub Workbook_Open()
Range("A1").Value = 0 'adjust to suit
End Sub

regards
FSt1
 
You can use the Auto_Open procedure. Open the VBA Editor (ALT F11),
insert a Module from the Insert menu, and in that module use


Sub Auto_Open()
ThisWorkbook.Worksheets("Sheet1").Range("A1").Value = 0
End Sub

Change the sheet name and cell reference as required.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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

Back
Top