Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanksyou so much for the code..
It helped me a lot.. Boss "Mike H" wrote: Hi, This writes the number of times the macro has been executed to a text file. Make these the first lines of your sub Sub ControlFreak() Filenum = FreeFile fname = "C:\timesrun.text" If Dir(fname) < "" Then Open fname For Input As Filenum Input #Filenum, timesrun timesrun = timesrun + 1& Close #Filenum Else timesrun = 1& End If Open "C:\timesrun.text" For Output As Filenum Print #Filenum, timesrun Close #Filenum MsgBox "This macro has been run " & timesrun & " Times" End Sub Mike "Boss" wrote: Hi, Can we record the number of times the macro is getting executed? Can this be recorded in a cell? Better if this can be recorded in a variable within the VBA code. By doing this i would actually limit the use of macro to senior people in the organisation i work for. Thanks in advance. Boss |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Number of Times Q | Excel Worksheet Functions | |||
count the number of times the same number shown | Excel Discussion (Misc queries) | |||
Count number of times a specific number is displayed in a cell ran | Excel Worksheet Functions | |||
Count number of times a specific number is displayed in cells | Excel Programming | |||
Macro to Count how many times a number occurs on a day | Excel Programming |