Sequential Numbering

J

John Calder

Hi

I use Excel 2000 with a Windows 2000 operating system.

I would like to have an excel file that when I open it up,
it generates a sequential number in cell A1.

Is there a template maybe that I could use for this? or
maybe someone can explain how to do it.

Any advice is much appreciated.

John Calder
 
F

Frank Kabel

Hi
this would require VBA. You may put the following code in your workbook
module (not in a standard module):

Private Sub Workbook_Open()
with me.worksheets("sheet1").range("A1")
.value = .value+1
end with
End Sub
 
J

John Calder

Thanks for your help with this Frank.

I think I can get it into a module alright but I am not
sure what you mean by (not in a standard module)

Any chance you could explain this to me.


John Calder
 
F

Frank Kabel

Hi
In this cas this has to go in your workbook moudle:
- opne the VBA editor with aKT+F11
- locate 'ThisWorkbook' in the left explorer tree view
- double click on this entry
- paste the code in the appearing editor window.

You may also take a look at:
http://www.cpearson.com/excel/events.htm
 
M

Max

One alternative is to just right-click on the Excel icon,
(which is just to the left of "File" on the standard menu bar)
then choose "View code"

This will also bring you direct to the This Workbook module in VBE
 

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

Top