#1   Report Post  
Posted to microsoft.public.excel.misc
GEM GEM is offline
external usenet poster
 
Posts: 90
Default Reseting to 0.

Is there a way to reset a specific cell to 0 every time the file is opened??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Reseting to 0.

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 he
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.)


GEM wrote:

Is there a way to reset a specific cell to 0 every time the file is opened??


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Reseting to 0.

hi
in it simplest form..
Private Sub Workbook_Open()
Range("A1").Value = 0 'adjust to suit
End Sub

regards
FSt1

"GEM" wrote:

Is there a way to reset a specific cell to 0 every time the file is opened??

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Reseting to 0.


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").Valu e = 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)

On Thu, 2 Apr 2009 15:00:10 -0700, GEM
wrote:

Is there a way to reset a specific cell to 0 every time the file is opened??

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reseting named ranges. Jim Excel Discussion (Misc queries) 4 September 11th 06 01:04 PM
VBA reseting variables Jeff Excel Discussion (Misc queries) 0 February 4th 06 08:22 PM
VBA reseting variables bpeltzer Excel Discussion (Misc queries) 0 February 4th 06 03:52 PM
Manually reseting the used cell range Woody13 Excel Discussion (Misc queries) 2 January 26th 06 09:10 PM
name box reseting lrod1843 Excel Discussion (Misc queries) 1 June 16th 05 12:51 AM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"