I have never reallly thought about that aspect before, but I do have some
loops that change font size and color on a random basis. However, these are
ran to a fixed limit of loops with a counter or length of text, etc. Here is
a clunge job that allows you to change the frequency of the beep by changing
the delay time. I started with a value of 2 in cell B2 and changed it to 10,
5 , 1 and 0 to see if I could detect the tempo change and it seemed to work.
Maybe you can adapt it to your situation.
"Kevin" wrote:
> I did try modeless with no luck. mayber there is a different way to go about
> this...
> What I want to happen is to get a tap sound every millisecond that is
> defined by the scroll bar value.
> I would like to be able to change the scroll bar value as its tapping and
> have it increase or decrease accordingly. And of course start and stop when
> the button is clicked. Is there some way better than a simple loop to do
> this?
>
> Thanks again,
> Kevin
>
>
> "JLGWhiz" wrote:
>
> > What you can do is either set a limit with a counter or use the OnTime method
> > to turn it off.
> >
> > "Kevin" wrote:
> >
> > > I'm trying to make what I thought was a simple metronome.
> > >
> > > I have a userform with a scroll bar and a toggle button
> > >
> > > The toggle buttonn is for the start stop. the scroll bar is for the time
> > > value in between taps.
> > >
> > > right now it is working when I start it but then I cannot click on the
> > > toggle button again to get it to stop, or click on the scroll bar to change
> > > the tempo value.
> > >
> > > How can I run a loop and stiil be able to click on a button on the user form?
> > >
> > >
> > > Here is my code...
> > >
> > > Private Sub ToggleButton1_Click()
> > > Do While ToggleButton1.Value = True
> > > Sleep ScrollBar1.Value
> > > Application.Run "tap" ' Plays C:\WINDOWS\Media\start.Wav
> > > Loop
> > > End Sub
> > >
> > > Thanks
> > > Kevin
> > >
> > >
> > >
|