locked
How to navigate multiple IE url using vba RRS feed

  • Question

  • I have a macro in which i am getting data from IE html code.Now i want to execute 5 macros having different names but functionality is same that getting data from IE html code.Is this possible that i will be able to execute all macros and get five macro result simultaneously i.e get 5 macro result in five excel sheet same time.
    Monday, December 21, 2015 10:34 AM

All replies

  • It sounds like you need this.
    Sub MainMacro()
       'some code
       'call another macro
       Call Macro2
       'some other code
    End Sub
    
    Sub Macro2()
       'some code
    End Sub



    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Monday, December 21, 2015 3:14 PM
  • Above code execute all macros at a time or first finish macro 1 and then start macro 2.My require to execute all at time.
    Monday, December 21, 2015 3:39 PM
  • Please confirm above macros execute same time or in sequence i.e macro1 and after macro 1 finish start macro 2 etc.My requirement is to execute same time...thanks.
    Monday, December 21, 2015 4:56 PM
  • If you are talking about multithreading, it can't be done natively with VBA.  VBA is built in a single-threaded apartment.  The only way to get multiple threads is to build a DLL in something other than VBA that has a COM interface and call it from VBA.

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Monday, December 21, 2015 5:53 PM
  • Thanks for your response.Is this possible in Acces i.e in Access form on button code i have complete code and after navigation i will be able to run multiple threads.Also if you have any sample code than please share.
    Wednesday, December 23, 2015 4:35 PM
  • There is no easy way to do threading in VBA.  I looked at this a long time ago to manage some async operations.  I think the best approach is to do them sequentially.  If you are serious about doing them with multithreading you could look at C# and VSTO or NetOffice.  I am not even sure that it is possible using Access.  Maybe using Excel it is possible.  You would certainly need to be a good programmer to get it done.
    Thursday, December 24, 2015 1:26 PM