Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


record number each time sheet is opened

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
tssgw



Joined: 05 Oct 2008
Posts: 1

PostPosted: Sun Oct 05, 2008 11:18 am    Post subject: record number each time sheet is opened Reply with quote

I have a spread sheet and when it is opened it will create a new random number (let say in cell d10).

What I want is each time the spread sheet is opened it would get the random number created from cell d10 and then write it to cell "a10" then drop down and write the number Rolling Eyes to "a11" the next time it is opened.

Basically Keep a history of each random number created when the sheet is opened.
Back to top
View user's profile Send private message
mohan.ankur
Moderator
Moderator


Joined: 02 Aug 2006
Posts: 52

PostPosted: Mon Nov 17, 2008 2:58 pm    Post subject: Reply with quote

You would need to write a code on the Workbook Open event.

Something like below...

Private Sub Workbook_Open()
Range("A65536").End(xlUp).Offset(1, 0).Value = Rnd()
End Sub
_________________
http://www.exceldepot.com
http://www.xlmacros.com
http://www.learnexcel.org
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group