A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to increase a number by 1 every time the spreadsheet opens?



 
 
Thread Tools Display Modes
  #1  
Old September 15th 09, 08:11 PM posted to microsoft.public.excel.misc
sld
external usenet poster
 
Posts: 10
Default How to increase a number by 1 every time the spreadsheet opens?

Is there a way to have a number increase by 1 every time the excel
spreadsheet opens?
Ads
  #2  
Old September 15th 09, 08:30 PM posted to microsoft.public.excel.misc
Bernard Liengme[_3_]
external usenet poster
 
Posts: 1,104
Default How to increase a number by 1 every time the spreadsheet opens?

With a Workbook open even macro such as

Private Sub Workbook_Open()
Range("Sheet1!A1").Value = Range("Sheet1!A1").Value + 1
End Sub

Open the VBA editor, right click ThisWorkbook for the file in question and
use View Code
Paste this macro into the module

New to VBA? See

David McRitchie's site on "getting started" with VBA

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Debra Dalgleish's "Adding Code to a Workbook"

http://www.contextures.com:80/xlvba01.html

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"SLD" > wrote in message
...
> Is there a way to have a number increase by 1 every time the excel
> spreadsheet opens?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i have a cell number increase by 1 each time file opened DJbase Excel Discussion (Misc queries) 1 May 25th 08 04:17 AM
Spreadsheet opens very slowly Rich W. Excel Discussion (Misc queries) 5 May 19th 08 07:36 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
EXCEL to update a number each time worksheet opens. hotchickbiker Excel Discussion (Misc queries) 2 August 15th 06 02:14 AM
How to automtically increase a number every time a file is used falcp Excel Discussion (Misc queries) 1 January 16th 06 03:29 PM


All times are GMT +1. The time now is 10:36 AM.


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