• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Delaying a Macro after workbook opens...

Soumik Seth

New Member
Hello all,

I have a macro called CreateTagConfiguration which I am calling like below:

Private Sub Workbook_Open()
Call CreateTagConfiguration
End Sub

What I really need is to delay the execution of this macro by 5-6 Seconds.I have some external data coming in when I open the excel file.Only after getting this external data,this CreateTagConfiguration macro should run.

Thanks in advance for any help.
 
Hi Soumik..

Welcome to the forum..

Try this..

Code:
Private Sub Workbook_Open()
  MsgBox "Using below line.. Procedure will be executed after 5 Second"
  Application.OnTime Now + TimeValue("00:00:05"), "CreateTagConfiguration"
End Sub
 
Hello Debraj

I have been following this site for a couple of weeks,for lookup functions and charts particularly.It's really good to be here.
Back to the problem....
I am trying what you have posted but it just isn't working.A popup comes like below:
upload_2014-6-2_1-23-55.png
I am using excel 97-03 version.
All these VBA codes are written in "ThisWorkbook" and not in any "module".
In excel options all Macros are enabled.
Any hand?
Thanks.
 
I have a macro called CreateTagConfiguration

Above message is showing that.. CreateTagConfiguration macro is not available.. but as per your statement.. you have that MACRO..

Check other Module.. or if this is in other Workbook.. try to call using..
"Personal.xls!CreateTagConfiguration"

where Personal.xls is the name of opened workbook, with Public Subroutine.. CreateTagConfiguration
 
Back
Top