how can i add a timer to this hyperlink opening code

the attachde vba opens urls all at once . i want to specify a time delay....one that i can set when i run the macro...think i need a form control. any ideas?

thanks!
ALL-MACROS.xlsm
finnstoneAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try
Application.Wait(Now + TimeValue("0:00:02"))

Open in new window

Regards
0
finnstoneAuthor Commented:
I ACTUALLY NEED A TIMER THAT ITSELF IS VARYING

SO EVERY TEN LOOPS, IT CHANGES THE DELAY BY 1 SECOND. so delay for n=1-10 is 10 seconds and delay for n=11-20 is 11 seconds

attached is the code working so that every loop it changes by a fixed amount....got it that far, now just need it to be more dynamic
ALL-MACROS.xlsm
0
Rgonzo1971Commented:
then try
Public Sub Open_Google_Searches()

  Dim objCell As Range
  Dim intLoopcnt As Integer
  Dim lngDelay As Long
 
  intLoopcnt = 1
  For Each objCell In [a56:a64]
 
      DoEvents
     
      If Not IsEmpty(objCell) Then
        '   If Not (blnShell_Execute("http://www.linkedin.com/profile/view?id=" & objCell & "&trk=miniprofile-name-link%22" & "%22")) Then'
             '   If Not (blnShell_Execute("http://www.linkedin.com/vsearch/p?company=" & objCell & "&openAdvancedForm=true&companyScope=CP&locationType=Y&rsid=21620241421683495020&orig=ADVS" & "%22")) Then '
                   If Not (blnShell_Execute(objCell)) Then
' If Not (blnShell_Execute("http://www.google.com/search?hl=en&q=" & objCell)) Then '
'      If Not (blnShell_Execute("https://na3.salesforce.com/" & objCell)) Then '
   
            MsgBox "Could not launch:" & vbCrLf & vbLf & objCell, _
                    vbExclamation Or vbOKOnly, _
                    ActiveWorkbook.Name
         End If
      End If
     lngDelay = (10 + (intLoopcnt \ 10)) * 1000
     Call DelayMs(lngDelay)
     intLoopcnt = intLoopcnt + 1
  Next objCell
                
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

finnstoneAuthor Commented:
can you do another one? i will post it soon, similar algo logic
0
finnstoneAuthor Commented:
thx!
0
finnstoneAuthor Commented:
this overflows at 32000 (iteration 14)

lngDelay = (10 + (intLoopcnt \ 2)) * 2000
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.