The thing about this is that with Internet Explorer, things can happen simultaneously.A page is "launched", and while it's loading, multiple images are downloaded, which complete at different times.Macros can start, and buttons can be clicked before the page is fully loaded. IE.readystate is used to determine if the page has loaded completely. With Excel, those things don't happen simultaneously (unless specifically DESIGNED to do so).Once the file is loaded, THEN the workbook_open macro executes. So, the fact that the Workbook_Open event runs means that the file has loaded. Paul----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- From: Mandeep Baluja <rockerna...@gmail.com> To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> Cc: schreiner_p...@att.net Sent: Monday, November 9, 2015 8:12 AM Subject: Re: $$Excel-Macros$$ Query for Excel Thanks Paul :) The thing I am already aware about workbook_open event I was just trying to know is there any property in excel which gives us that worksheet has been loaded properly. Just like this code readystate =4 is the property which confirms that page is loaded properly. IE.readyState = 4
Anyways Thanks a lot . On Monday, November 9, 2015 at 5:43:55 PM UTC+5:30, Paul Schreiner wrote: In VBA:Go to the "ThisWorkbook" module. In the programming pane, on the top left, use the pull-down to select "Workbook". If it doesn't already exist, a Private Sub Workbook_Open()event macro will be created. This macro runs once the workbook is open. BTW: At the top-right of the pane, the pulldown will list other "event" macros available. also, an alternative is to create a macro called:sub Auto_Open() this goes in a "standard" module.It works similar to the Workbook_Open event macro. hope this helps. Paul------------------------------ ----------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ------------------------------ ----------- From: Mandeep Baluja <rocke...@gmail.com> To: MS EXCEL AND VBA MACROS <excel-...@googlegroups.com > Sent: Monday, November 9, 2015 4:49 AM Subject: $$Excel-Macros$$ Query for Excel I want to run a VBA macro AFTER the workbook has finished opening. I don't want to use application.ontime method to wait, I just want to run my macro only when workbook is completely loaded. Same as like Do Until IE.readyState = 4 DoEvents Loop Regards,Mandeep baluja -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/ discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros...@ googlegroups.com. To post to this group, send email to excel-...@googlegroups.com. Visit this group at http://groups.google.com/ group/excel-macros. For more options, visit https://groups.google.com/d/ optout. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.