Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default automatic numbering of cells in excel

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default automatic numbering of cells in excel

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default automatic numbering of cells in excel

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default automatic numbering of cells in excel

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default automatic numbering of cells in excel

Thanks again Gary - that worked great, but do I have to leave the "Enable all
macros (not recommended...) checked for this to work?

"Gary''s Student" wrote:

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default automatic numbering of cells in excel

If you are concerned:

1. leave the Security settings at a level you ae comfortable with
2. don't open this workbook with a double click to an icon, instead:
3. open Excel
4. fix the security setting to allow this macro
5. open the file
6. after closing the file restore the settings.
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks again Gary - that worked great, but do I have to leave the "Enable all
macros (not recommended...) checked for this to work?

"Gary''s Student" wrote:

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default automatic numbering of cells in excel

Thanks again Gary - now do you have any good connections for some help with
Infopath?

"Gary''s Student" wrote:

If you are concerned:

1. leave the Security settings at a level you ae comfortable with
2. don't open this workbook with a double click to an icon, instead:
3. open Excel
4. fix the security setting to allow this macro
5. open the file
6. after closing the file restore the settings.
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks again Gary - that worked great, but do I have to leave the "Enable all
macros (not recommended...) checked for this to work?

"Gary''s Student" wrote:

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when opened.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default automatic numbering of cells in excel

microsoft.public.infopath

For a complete list of MS news groups try here.

http://aumha.org/nntp.htm


Gord Dibben MS Excel MVP

On Wed, 7 Mar 2007 09:32:00 -0800, George
wrote:

Thanks again Gary - now do you have any good connections for some help with
Infopath?

"Gary''s Student" wrote:

If you are concerned:

1. leave the Security settings at a level you ae comfortable with
2. don't open this workbook with a double click to an icon, instead:
3. open Excel
4. fix the security setting to allow this macro
5. open the file
6. after closing the file restore the settings.
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks again Gary - that worked great, but do I have to leave the "Enable all
macros (not recommended...) checked for this to work?

"Gary''s Student" wrote:

1. touch ALT-F11 to bring up VBA
2. right-click TisWorkbook in the left hand panel
select view code
3. paste the stuff in
4. close the VBA window (save is not necessary)
--
Gary''s Student
gsnu200709


"George" wrote:

Thanks Gary, I am a little green with macros - can you explain this in
greater detail - please?

"Gary''s Student" wrote:

To make cell A1 in Sheet1 increment every time the workbook is opened:

In ThisWorkbook code enter the following macro:

Private Sub Workbook_Open()
Set r = Sheets("Sheet1").Range("A1")
r.Value = r.Value + 1
End Sub

--
Gary''s Student
gsnu200709


"George" wrote:

Is there a way to make a cell automatically number itself everytime the work
book is opened? I would like to create an invoice that automatically changes
it's number when 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
automatic numbering of rows in excel, how to? Linda C. Excel Worksheet Functions 10 April 10th 09 01:02 PM
Excel/VBA Automatic Numbering [email protected] New Users to Excel 1 February 8th 07 10:41 PM
Automatic numbering in excel dshemesh New Users to Excel 1 May 24th 06 02:53 PM
excel automatic numbering Spice Excel Discussion (Misc queries) 4 April 25th 06 07:04 PM
How do I set up invoice automatic numbering in excel? Tracy Excel Discussion (Misc queries) 1 March 22nd 05 05:31 PM


All times are GMT +1. The time now is 12:57 PM.

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"