Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mowen
 
Posts: n/a
Default 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   Report Post  
swatsp0p
 
Posts: n/a
Default 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   Report Post  
mowen
 
Posts: n/a
Default 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   Report Post  
mowen
 
Posts: n/a
Default 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
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Change number in Text Box in Excel Jerry Dyben Excel Discussion (Misc queries) 2 September 23rd 05 02:40 AM
How do I change the number of decimal places displayed in Excel Dan Excel Discussion (Misc queries) 1 February 23rd 05 10:31 PM
Difference in number of Excel NewsGroups Hari Prasadh Excel Discussion (Misc queries) 1 January 25th 05 11:32 AM
Excel Files Won't Open From Shortcut ConfusedNHouston Excel Discussion (Misc queries) 5 December 31st 04 06:25 PM


All times are GMT +1. The time now is 12:55 AM.

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"