-
incrementing numbers in an excel template
I would like to be able to automatically increment numbers when opening a
workbook based on an excel template. example when opening a workbook number
75 auto. pops up in a specific cell. only when i save the workbook will the
next workbook opened contain the number 76. I would also like to somehow
store these numbers in a database type format for reference purposes
thank you,
christian
-
Re: incrementing numbers in an excel template
"Christian" <Christian@cvimages.com> wrote:
>
>I would like to be able to automatically increment numbers when opening
a
>workbook based on an excel template. example when opening a workbook number
>75 auto. pops up in a specific cell. only when i save the workbook will
the
>next workbook opened contain the number 76. I would also like to somehow
>store these numbers in a database type format for reference purposes
>
>thank you,
>christian
>
I don't know, would this help;
With the object ThisWorkbook, event Activate
Private Sub Workbook_Activate()
'Sheets(1) renamed Log Sheet
With ActiveWorkbook.Sheets("Log Sheet")
.Cells(1, 1) = .Cells(1, 1) + 1
End With
End Sub
Everytime I open the workbook the number in the cell A1 incraments by 1.
-
Re: incrementing numbers in an excel template
thank you, i guess you
"ke11ey" <ke11eyh@zdnetonebox.com> wrote:
>
>"Christian" <Christian@cvimages.com> wrote:
>>
>>I would like to be able to automatically increment numbers when opening
>a
>>workbook based on an excel template. example when opening a workbook number
>>75 auto. pops up in a specific cell. only when i save the workbook will
>the
>>next workbook opened contain the number 76. I would also like to somehow
>>store these numbers in a database type format for reference purposes
>>
>>thank you!
>>christian
>>
>I don't know, would this help;
>
>With the object ThisWorkbook, event Activate
>Private Sub Workbook_Activate()
> 'Sheets(1) renamed Log Sheet
> With ActiveWorkbook.Sheets("Log Sheet")
> .Cells(1, 1) = .Cells(1, 1) + 1
> End With
>End Sub
>Everytime I open the workbook the number in the cell A1 incraments by 1.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks