Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to add VB subroutine code, when I open an Excel
template form that I have built that a defined cell receives a unique number by counting one greater than when the form was previously opened from the VB code. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Norm
Paste this macro in the Workbook module. You access this module by right-clicking on the icon to the left of the "File" of the worksheet menu and selecting View Code. X-out of the VBE to return to the worksheet. As written, this macro increments A1 by 1 each time the file is opened. HTH Otto Private Sub Workbook_Open() Sheets("MySheet").Range("A1") = _ Sheets("MySheet").Range("A1") + 1 End Sub "Norm Taylor" wrote in message ... I want to add VB subroutine code, when I open an Excel template form that I have built that a defined cell receives a unique number by counting one greater than when the form was previously opened from the VB code. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
System Registry | Excel Programming | |||
Linked worksheet Query Counter | Excel Programming | |||
Registry | Excel Programming | |||
Registry | Excel Programming |