Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Change number when you open the excel template
Hi everebody My intention is to make a template to my reports. To make order in all my reports I want a macro that change the reports number every time I open the template. First time I open the template the reports number will be 1 (The string in the workbook is Report number 1) and next time report number 2..... I hope it is possible and that one of you excel members will help me out! Thank you and best regards Rune -- mowen ------------------------------------------------------------------------ mowen's Profile: http://www.excelforum.com/member.php...fo&userid=8463 View this thread: http://www.excelforum.com/showthread...hreadid=477206 |
#2
|
|||
|
|||
Change number when you open the excel template
try something like this in a Workbook Open() event: Private Sub Workbook_Open() Sheets("sheet1").Select Range("A1").Value = Range("A1").Value + 1 Range("A1").Select End Sub -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=477206 |
#3
|
|||
|
|||
Change number when you open the excel template
Hi swatsp0p Thanks mate! -- mowen ------------------------------------------------------------------------ mowen's Profile: http://www.excelforum.com/member.php...fo&userid=8463 View this thread: http://www.excelforum.com/showthread...hreadid=477206 |
#4
|
|||
|
|||
Change number when you open the excel template
Hi again I have discovered a problem when I saved the report with another name. With this code it will also count everytime I open this file. It is possible to restrict the macro to only be active at the template file or other methods to avoid this problem? best regards Rune -- mowen ------------------------------------------------------------------------ mowen's Profile: http://www.excelforum.com/member.php...fo&userid=8463 View this thread: http://www.excelforum.com/showthread...hreadid=477206 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Change number in Text Box in Excel | Excel Discussion (Misc queries) | |||
How do I change the number of decimal places displayed in Excel | Excel Discussion (Misc queries) | |||
Difference in number of Excel NewsGroups | Excel Discussion (Misc queries) | |||
Excel Files Won't Open From Shortcut | Excel Discussion (Misc queries) |