PC Review


Reply
Thread Tools Rate Thread

is Clickyes running if not runit

 
 
Trev B
Guest
Posts: n/a
 
      12th Jan 2010
Hi,

Thanks in advance

I need to test if clickyes is running

sub isclickyesrunning()
'ok thats what we want carry on

else

start clickyes

endif

end sub
Once again thanks for your help
--
Trev B
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      12th Jan 2010
See http://www.mvps.org/access/api/api0007.htm at "The Access Web"

See http://www.mvps.org/access/api/api0013.htm for how to determine the
class name.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Trev B" <(E-Mail Removed)> wrote in message
news:07E43C91-1689-48C3-9827-(E-Mail Removed)...
> Hi,
>
> Thanks in advance
>
> I need to test if clickyes is running
>
> sub isclickyesrunning()
> 'ok thats what we want carry on
>
> else
>
> start clickyes
>
> endif
>
> end sub
> Once again thanks for your help
> --
> Trev B



 
Reply With Quote
 
vanderghast
Guest
Posts: n/a
 
      12th Jan 2010
The easiest way would be to create a Boolean guard variable/property.



Private mIsClickRunning As Boolean
....
Private Sub ClickYes()
mIsClickRunning = true
...
mIsClickRunning = false
exit sub
End Sub



And test the value of mIsClickRunning. Note that you have to assign
mIsClickRunning to false for each exit point of the subroutine ClickYes.


Note that there is only one VBA thread of execution, so at most, other
procedures will be SUSPENDED rather than RUNNING. You can suspend code by
calling another procedure, by issuing DoEvents, entering in a modal form
(with timer event or otherwise), etc., but only ONE piece of code will be
effectively running (in progress).


If you run many MSAccess.exe and if you want to know if one of them is ever
running the said subroutine (example, because it would have to use a
resource in exclusivity), you have to relay on something like mutex, since
each MSAccess object will maintain its own variable mIsClickRunning, while a
mutex is owned by the operating system. But if you are only interested in on
MSAccess application running, a Boolean guard is more than enough.


Vanderghast, Access MVP


"Trev B" <(E-Mail Removed)> wrote in message
news:07E43C91-1689-48C3-9827-(E-Mail Removed)...
> Hi,
>
> Thanks in advance
>
> I need to test if clickyes is running
>
> sub isclickyesrunning()
> 'ok thats what we want carry on
>
> else
>
> start clickyes
>
> endif
>
> end sub
> Once again thanks for your help
> --
> Trev B


 
Reply With Quote
 
Trev B
Guest
Posts: n/a
 
      13th Jan 2010
For details on click yes see :- http://www.contextmagic.com/express-clickyes/

Very good when tring to send emails using vba in access so Outlook will send
document.
--
Trev B


"BruceM via AccessMonster.com" wrote:

> What are clickyes and isclickyesrunning? In general, what real-world thing
> are you trying to accomplish?
>
>
> Trev B wrote:
> >Hi,
> >
> >Thanks in advance
> >
> >I need to test if clickyes is running
> >
> >sub isclickyesrunning()
> >'ok thats what we want carry on
> >
> >else
> >
> >start clickyes
> >
> >endif
> >
> >end sub
> >Once again thanks for your help

>
> --
> Message posted via http://www.accessmonster.com
>
> .
>

 
Reply With Quote
 
Trev B
Guest
Posts: n/a
 
      13th Jan 2010
Hi Doug,

Have tried the method but it says false whether it is running or not!

Any more suggestions?

Thanks for your help it is very much appreciated.

Trev B


"Douglas J. Steele" wrote:

> See http://www.mvps.org/access/api/api0007.htm at "The Access Web"
>
> See http://www.mvps.org/access/api/api0013.htm for how to determine the
> class name.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
> "Trev B" <(E-Mail Removed)> wrote in message
> news:07E43C91-1689-48C3-9827-(E-Mail Removed)...
> > Hi,
> >
> > Thanks in advance
> >
> > I need to test if clickyes is running
> >
> > sub isclickyesrunning()
> > 'ok thats what we want carry on
> >
> > else
> >
> > start clickyes
> >
> > endif
> >
> > end sub
> > Once again thanks for your help
> > --
> > Trev B

>
>
> .
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      13th Jan 2010
You sure you're using the correct class name?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Trev B" <(E-Mail Removed)> wrote in message
news:F4B2CE16-B128-403A-8478-(E-Mail Removed)...
> Hi Doug,
>
> Have tried the method but it says false whether it is running or not!
>
> Any more suggestions?
>
> Thanks for your help it is very much appreciated.
>
> Trev B
>
>
> "Douglas J. Steele" wrote:
>
>> See http://www.mvps.org/access/api/api0007.htm at "The Access Web"
>>
>> See http://www.mvps.org/access/api/api0013.htm for how to determine the
>> class name.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>> "Trev B" <(E-Mail Removed)> wrote in message
>> news:07E43C91-1689-48C3-9827-(E-Mail Removed)...
>> > Hi,
>> >
>> > Thanks in advance
>> >
>> > I need to test if clickyes is running
>> >
>> > sub isclickyesrunning()
>> > 'ok thats what we want carry on
>> >
>> > else
>> >
>> > start clickyes
>> >
>> > endif
>> >
>> > end sub
>> > Once again thanks for your help
>> > --
>> > Trev B

>>
>>
>> .
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Enter your connection string??? Do I need a reference to runit? rebelscum0000 Microsoft Access 8 8th Apr 2008 09:35 PM
Access 2007 and ClickYes =?Utf-8?B?SmVycnkgV2hpdHRsZQ==?= Microsoft Access 6 23rd Feb 2007 11:46 PM
[Update] RunIt v2.0 (quickly launch files program) Captain Video Freeware 6 2nd Jul 2006 02:17 PM
RunIT! Navel Lint Freeware 0 1st May 2006 02:53 PM
Express ClickYes Problem bradsalmon Microsoft Outlook VBA Programming 3 17th Oct 2005 05:35 PM


Features
 

Advertising
 

Newsgroups
 


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