incrementing numbers in an excel template


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: incrementing numbers in an excel template

  1. #1
    Christian Guest

    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


  2. #2
    ke11ey Guest

    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.


  3. #3
    christian Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center