haddonsman
New Member
- Joined
- Dec 5, 2007
- Messages
- 11
I'm trying to get a feel for how often some of our woorkbooks are used.
I can generate a message box that gives a count on open using this code;
Private Sub Workbook_Open()
notimes = GetSetting("MyCount", "A", "Count", 0) + 1
MsgBox "Workbook has been opened " & notimes & " times."
SaveSetting "MyCount", "A", "Count", notimes
... but I've no way of formatting that box ( I want to add some explanatory text over several lines)
I can create a userform in the format I want, and get it to display each time the workbook is opened, but I don't know how to incorporate the above code into it so I get to see the count.
Can I either amend the font/display values of the msg box or can I insert the count code into a userform?
Or could I do away with the boxes altogether and generate a count figure that only I have access to?
I can generate a message box that gives a count on open using this code;
Private Sub Workbook_Open()
notimes = GetSetting("MyCount", "A", "Count", 0) + 1
MsgBox "Workbook has been opened " & notimes & " times."
SaveSetting "MyCount", "A", "Count", notimes
... but I've no way of formatting that box ( I want to add some explanatory text over several lines)
I can create a userform in the format I want, and get it to display each time the workbook is opened, but I don't know how to incorporate the above code into it so I get to see the count.
Can I either amend the font/display values of the msg box or can I insert the count code into a userform?
Or could I do away with the boxes altogether and generate a count figure that only I have access to?