A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sequential Numbering



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2004, 05:35 AM
John Calder
external usenet poster
 
Posts: n/a
Default Sequential Numbering

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


  #2  
Old May 20th, 2004, 08:20 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Sequential Numbering

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

--
Regards
Frank Kabel
Frankfurt, Germany


John Calder wrote:
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


  #3  
Old May 20th, 2004, 11:15 PM
John Calder
external usenet poster
 
Posts: n/a
Default Sequential Numbering

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


-----Original Message-----
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

--
Regards
Frank Kabel
Frankfurt, Germany


John Calder wrote:
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


.

  #4  
Old May 21st, 2004, 07:35 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Sequential Numbering

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

--
Regards
Frank Kabel
Frankfurt, Germany

"John Calder" schrieb im
Newsbeitrag ...
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


-----Original Message-----
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

--
Regards
Frank Kabel
Frankfurt, Germany


John Calder wrote:
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


.


  #5  
Old May 22nd, 2004, 01:51 PM
Max
external usenet poster
 
Posts: n/a
Default Sequential Numbering

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

--
Rgds
Max
xl 97
--
Please respond, in newsgroup
xdemechanik atyahoodotcom
---


 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:53 PM.


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