Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

new version# when opening file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jayjay - 18 Sep 2007 09:58 GMT
Hi,

I need a spreadsheet where a cell (fx."A1") shows the latest report version,
i.e. the cell needs to change the version-number from # to #+1, when you open
the report.
Does anyone know a macro which can do this ?

BR,
Jakob
Bob Phillips - 18 Sep 2007 10:01 GMT
Private Sub Workbook_Open()
   With ThisWorkbook.Worksheets("Sheet1").Range("A1")
       .Value = .Value + 1
   End With
   ThisWorkbook.Save
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi,
>
[quoted text clipped - 7 lines]
> BR,
> Jakob
Jayjay - 18 Sep 2007 11:56 GMT
Thanks Bob,
Perfect!

> Hi,
>
[quoted text clipped - 5 lines]
> BR,
> Jakob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.