Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Use Counter


I'm sure everyone has gone to a website that shows the number of users
who've visited the site. Is it poosible to put such a counter into a
macro so that the next time the initial form opens it displays the
number of times it's been opened?


--
scantor145
------------------------------------------------------------------------
scantor145's Profile: http://www.excelforum.com/member.php...o&userid=14766
View this thread: http://www.excelforum.com/showthread...hreadid=393408

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro Use Counter

Obviously, to be of any use and the value/count is to be stored in the
workbook, the workbook would have to be saved each time the form is shown.
Is that acceptable? An alternative is to use the registry or a separate
file. The registry is only useful if it is to be used on a single computer.
A separate file would have to be located with the workbook. By the way,
what do you mean by FORM? Do you mean a userform or are you setting up a
worksheet to look like a paper form/webpage?

--
Regards,
Tom Ogilvy
"scantor145" wrote
in message ...

I'm sure everyone has gone to a website that shows the number of users
who've visited the site. Is it poosible to put such a counter into a
macro so that the next time the initial form opens it displays the
number of times it's been opened?


--
scantor145
------------------------------------------------------------------------
scantor145's Profile:

http://www.excelforum.com/member.php...o&userid=14766
View this thread: http://www.excelforum.com/showthread...hreadid=393408



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Macro Use Counter

On some obscure worksheet place a named cell "Counter". On your initial
form place a text box and set its "ControlSource" to Counter. Everytime
the macro executes increment Counter

' Code to show Userform

Option Explicit

Sub Test()
UserForm1.Show
End Sub

' Code to increment counter code of Userform

Option Explicit

Private Sub UserForm_Activate()
Range("Counter") = Range("Counter") + 1
End Sub


*** Sent via Developersdex http://www.developersdex.com ***
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
Counter in macro orquidea Excel Discussion (Misc queries) 0 April 28th 09 08:13 PM
Macro for a "counter" Lineman116 Excel Discussion (Misc queries) 2 March 11th 09 07:37 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
A Login Macro, (Inputbox & MsgBox)..Need help with a counter. Max via OfficeKB.com Excel Programming 1 June 13th 05 08:52 PM
Counter Don Guillett[_4_] Excel Programming 0 July 17th 03 12:30 AM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"