Results 1 to 34 of 34

Thread: VBA for open multiple webpage in new tab (IE)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Lightbulb VBA for open multiple webpage in new tab (IE)

    HI Everyone
    I have a couple of VBA Code (Nearly 10) to open and auto login a web pages. i need to open all these macros with single click, so i have call all of these macros by button. the problem is this all are opening with new internet Explorer application.
    What i need is when i click the button IE should be opened as new and rest of the sites should be opened in new tab (but same IE).

    Is anyone know how to open multiple pages in new tab.

    Thanks in advance.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hello,Anyone have idea?
    Please help me if you know.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    the only suggestion i have is to open the first internet explorer window then from within that instance of IE to navigate to the additional links using the correct target value (possibly "blank") for a new tab

    or maybe better create a html page with auto open links to all the other pages with correct target value in the links

    note i have never done this, but can not see any reason why it would not work as desired
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi westconn
    Thanks for your reply..


    Is any other way to do this with VBA?

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    you should be able to implement the above suggestions all from vba
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    here is the code required to implement my first suggestion

    Code:
    Set wb = CreateObject("internetexplorer.application")
    wb.navigate2 "www.yahoo.com"
    wb.Visible = True
    '  for each additional URL
    wb.navigate2 "www.google.com", 2048&
    but NOTE each opened tab is a separate instance of internet explorer, so wb.quit will only close 1 tab not the internet explorer window
    to automate each TAb you will need to iterate the shell windows based on the url (or similar)
    one could assume (but should check) that the shell window index for each tab would be the previous tab + 1
    immediately after opening internet explorer (or any new tab) the shell window index is the count of shell windows -1, so you could set an object for each of the opened tabs, or reuse the object for each window, i would consider a dictionary of shell window objects
    like
    Code:
    Dim dict As Scripting.Dictionary
    lst = Array("www.yahoo.com", "www.google.com", "www.vbforums.com")
    
    Set dict = CreateObject("scripting.dictionary")
    Set sh = CreateObject("shell.application")
    Set wb = CreateObject("internetexplorer.application")
    wb.navigate2 lst(0)
    Application.Wait Now + TimeSerial(0, 0, 1)
    Set wb1 = sh.Windows(sh.Windows.Count - 1)
    dict.Add lst(l), wb1
    wb.Visible = True
    For l = 1 To UBound(lst)
        wb.navigate2 lst(l), 2048&
        Application.Wait Now + TimeSerial(0, 0, 1)
        Set wb1 = sh.Windows(sh.Windows.Count - 1)
        dict.Add lst(l), wb1
    Next
    Set wb1 = dict.Item("www.google.com")
    ' work with this url tab etc
    
    ' when finished with all
    For Each t In dict.Items
    t.Quit
    Next
    'wb.Quit
    this is tested and works correctly without error, it may need some modification for your application

    after posting this, i found i had been here before, totally forgot, from 5 years ago
    http://www.vbforums.com/showthread.p...-Explorer-Tabs

    i also read elsewhere that if protected mode is not on, there maybe an varying limit to the number of tabs that are opened before error
    Last edited by westconn1; Oct 21st, 2017 at 12:05 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Westconn
    Thanks for your Effort...This code was working fine.
    But its only open the the web page in new Tab.
    Actually i have a couple of Codes to automatic login in different web sites...that i need open in new Tab instead of New IE application.

    This is my example Code
    Code:
    Sub AutoLogin_gmail()
        Set ie = CreateObject("InternetExplorer.Application")
        my_url = "www.google.com"
    
        With ie
            .Visible = True
            .Navigate my_url
            .Top = 50
            .Left = 530
            .Height = 400
            .Width = 400
    
        Do Until Not ie.Busy And ie.readyState = 4
            DoEvents
        Loop
    
        End With
    
    ' Input the userid and password
        ie.Document.getElementById("uid").Value = "testID"
        ie.Document.getElementById("password").Value = "testPW"
    
        ie.Document.getElementById("enter").Click
    
        Do Until Not ie.Busy And ie.readyState = 4
            DoEvents
        Loop
    End Sub
    and
    Code:
    Sub Autologin_vbf()
        Set ie = CreateObject("InternetExplorer.Application")
        my_url = "www.vbforums.com"
    
        With ie
            .Visible = True
            .Navigate my_url
            .Top = 50
            .Left = 530
            .Height = 400
            .Width = 400
    
        Do Until Not ie.Busy And ie.readyState = 4
            DoEvents
        Loop
    
        End With
        ie.Document.getElementById("uid").Value = "testID"
        ie.Document.getElementById("password").Value = "testPW"
        ie.Document.getElementById("enter").Click
    
        Do Until Not ie.Busy And ie.readyState = 4
            DoEvents
        Loop
    End Sub
    This my Example codes...I have code for 10 different sites...
    I want to call these codes by Macro..and that should be open New Tab...
    or else this (code) website will be open in New tab if already opened the IE.

    Thanks again

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    you can either put your code in as you open each website, or you can open all the webpages first (as in my sample) then work with each webpage, by returning them from the dictionary (note that the dictionary object should be dimensioned globally, at the top of the module in the general section) any time you want to work with a specific webpage

    to use your existing subs you should dimension your internet explorer object (ie) globally, make the first line in each sub conditional
    Code:
    dim intab as variant
    if ie is nothing then
      Set ie = CreateObject("InternetExplorer.Application")
      else
      intab = 2048& 
    end if
    all the above code to replace the first line
    and add the variable (intab) as a parameter to the navigation .navigate my_url, intab
    i did not test any of this
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Sorry for the Late reply....
    Quote Originally Posted by westconn1 View Post
    you can open all the webpages first (as in my sample) then work with each webpage
    This good idea but each websites having different Element ID, then how can we set correct Element id for appropriate Pages.
    dim intab as variant
    if ie is nothing then
    Set ie = CreateObject("InternetExplorer.Application")
    else
    intab = 2048&
    end if
    I have tested this code and i got Object Required Error on below Line.
    Code:
    If ie Is Nothing Then
    This is the code what i have modified with your code.

    Code:
    Sub Autologin_vbf()
    'Set ie = CreateObject("InternetExplorer.Application")
       Dim intab As Variant
    If ie Is Nothing Then
      Set ie = CreateObject("InternetExplorer.Application")
      Else
      intab = 2048&
    End If
        my_url = "www.vbforums.com"
    
        With ie
            .Visible = True
            .Navigate my_url, intab
            .Top = 50
            .Left = 530
            .Height = 400
            .Width = 400
    
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop
    
        End With
        ie.Document.getElementById("uid").Value = "testID"
        ie.Document.getElementById("password").Value = "testPW"
        ie.Document.getElementById("enter").Click
    
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop
    End Sub
    Thanks

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    did you dimension ie in the general section of the module?

    Code:
    dim ie as object
    or public at the top of a standard module
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Quote Originally Posted by westconn1 View Post
    did you dimension ie in the general section of the module?

    Code:
    dim ie as object
    Yes, i'm used in general section module.

    I have tried your code ..but again it's opening with new IE Application not in new Tab.



    Thanks

  12. #12
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    i tested your procedure as posted, each opened in a new tab, but ie object still refers to the first window, so you still need to find the correct shell window to automate the contained document first, something like
    Code:
    Sub Autologin_vbf()
       Dim intab As Variant
       Set sh = CreateObject("shell.application")
    If ie Is Nothing Then
      Set ie = CreateObject("InternetExplorer.Application")
        With ie
            .Visible = True
            .Top = 50
            .Left = 530
            .Height = 400
            .Width = 400
        End With
      Else
      intab = 2048&
    End If
        my_url = "www.vbforums.com"
        wcnt = sh.Windows.Count
        ie.navigate2 "www.vbforums.com", intab
        If intab = 2048& Then
            Do Until sh.Windows.Count = wcnt + 1: Loop  'wait for window to be created
            Set wb = sh.Windows(wcnt)
            Else
            Set wb = ie
        End If
    
        Do Until Not wb.busy And wb.ReadyState = 4
            DoEvents
        Loop
    
        
        wb.Document.getElementById("uid").Value = "testID"
        wb.Document.getElementById("password").Value = "testPW"
        wb.Document.getElementById("enter").Click
    
        Do Until Not wb.busy And wb.ReadyState = 4
            DoEvents
        Loop
    End Sub
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Westconn
    Still i'm confused...can we do the same Auto login with chrome instead of IE.?
    In chrome all are opened in new Tab only.

    Thanks

  14. #14
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    if you can automate chrome, go for it, i do not use chrome at all, except on some old android tablets

    the code i posted before works correctly on my computer, but when i test on a later version of windows it sometimes fails to create a new shell window for each new tab opened, therefore automation does not work, using this method

    on further testing, it appears that the most likely reason for commencing to not add the new tab to the shell windows collection is opening the same (or similar) websites consecutively, it would appear a lot more testing is required, but with care this method will probably still work
    Last edited by westconn1; Oct 26th, 2017 at 04:09 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Westconn
    I have found one VBA code.. this will open the pages with new tab.. I have tried to merge with my code but its not working...
    Please help me to open webpages with Auto login in new tab using this code.

    Code:
    Sub Open_tab()
    Dim IE As Object
    With CreateObject("Shell.Application").Windows
        If .Count > 0 Then
            Set IE = .Item(0)
        Else
            Set IE = CreateObject("InternetExplorer.Application")
            IE.Visible = True
        End If
    IE.Navigate "http://support.microsoft.com/kb/q176792/"
    Set IE = Nothing
    End With
    End Sub
    Can you please help me on this..?

  16. #16
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    as far as i can see, the only difference between this and the code i posted, is it will use any already open shell window (not necessarily an instance of internet explorer), whereas the version as i have written, always creates a new instance of excel for your multiple autologins
    also shell windows can also include windows explorer (and some other system windows) as well as internet explorer, i do not see that the above will actually open a new tab, just renavigate some existing tab or window,

    on testing the above code, as is, with no internet explorer open first
    IE object window was an instance of Windows explorer not internet explorer
    the microsoft webpage actually opened in a new tab in my current firefox window, like double clicking a link in a windows explorer window
    this would depend on your default browser and the settings for it

    it would appear that even if the link opened in internet explorer, you would still need to connect to the correct shell window to provide automation

    in windows 10 i was unable to iterate through all the shell windows collection (as i do in older versions), only some do not error, this may work if the code is run as an administrator, but i have not tested that, not so easy to run VBA as administrator, you would have to elevate the entire excel application, there also appear to be other differences when working with shell object, such as mentioned previously, some opened tabs are not added as shell windows

    unfortunately, with the varying encountered results so far, the testing for this takes some time, more than i have to spare at the moment
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Westconn
    Sorry for late reply... please ignore my previous post #15.
    Can we proceed with your code...?

  18. #18
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    Can we proceed with your code...?
    for what it is worth, the code as posted in post #12 basically worked, with the provisos as stated in post #14 and #16 in the 4th paragraph
    i also do not know what versions of windows and internet explorer you are using, results may well vary with any different version of windows or internet explorer, i have tested in XP where all worked well and w10, where there were more problems
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  19. #19

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    I'm used Windows 7 64 bit and Internet Explorer 8

    I got debug Error on this line
    Code:
    wcnt = sh.Windows.Count

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Westconn

    could you please tell me how to do the Automatic login with two websites using your code which you posted in #12.
    I have tested your code its opening two websites in two separate Internet Explorer not opening in new Tab.

    Please help me on this.

  21. #21
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    post the code you are attempting with so i can test
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  22. #22

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    This one is i have tried but not working
    Code:
    Sub GetIE_LateBinding()
      
      Dim IE As Object
      my_url = "https://mail.google.com"
      With CreateObject("Shell.Application").Windows
        
        If .Count > 0 Then
          ' Get IE
          Set IE = .Item(0) ' or .Item(.Count - 1)
        Else
          ' Create IE
          Set IE = CreateObject("InternetExplorer.Application")
          IE.Visible = True
        End If
      With IE
     ' .Visible = True
        .Navigate my_url
      
        End With
          
       
        'Set IE = Nothing
      
      End With
       Do Until Not IE.Busy And IE.ReadyState = 4
            DoEvents
        Loop
    
    Application.Wait (Now + TimeValue("00:00:05"))
    IE.document.getElementById("userNameInput").Value = Sheets("Sheet1").Range("C79").Value
        IE.document.getElementById("passwordInput").Value = Sheets("Sheet1").Range("B20").Value
        IE.document.getElementById("submitButton").Click
    
        Do Until Not IE.Busy And IE.ReadyState = 4
            DoEvents
        Loop
      
    End Sub
    This your code which you posted
    Code:
    Sub Autologin_vbf()
       Dim intab As Variant
       Dim IE As Object
       Set sh = CreateObject("shell.application")
    If IE Is Nothing Then
      Set IE = CreateObject("InternetExplorer.Application")
        With IE
            .Visible = True
            .Top = 50
            .Left = 530
            .Height = 400
            .Width = 400
        End With
      Else
      intab = 2048&
    End If
        my_url = "www.google.com"
        wcnt = sh.Windows.Count
        IE.navigate2 "mail.google.com", intab
        If intab = 2048& Then
            Do Until sh.Windows.Count = wcnt + 1: Loop  'wait for window to be created
            Set wb = sh.Windows(wcnt)
            Else
            Set wb = IE
        End If
    
        Do Until Not wb.Busy And wb.ReadyState = 4
            DoEvents
        Loop
    
        
        wb.document.getElementById("userNameInput").Value = Sheets("Sheet1").Range("C79").Value
        wb.document.getElementById("passwordInput").Value = Sheets("Sheet1").Range("B20").Value
        wb.document.getElementById("submitButton").Click
    
        Do Until Not wb.Busy And wb.ReadyState = 4
            DoEvents
        Loop
        
        my_url = "www.google.com"
        wcnt = sh.Windows.Count
        IE.navigate2 "https://www.vbforum.com", intab
        If intab = 2048& Then
            Do Until sh.Windows.Count = wcnt + 1: Loop  'wait for window to be created
            Set wb = sh.Windows(wcnt)
            Else
            Set wb = IE
        End If
    
        Do Until Not wb.Busy And wb.ReadyState = 4
            DoEvents
        Loop
    
        
        wb.document.getElementById("user").Value = Sheets("Sheet1").Range("B21").Value
        wb.document.getElementById("password").Value = Sheets("Sheet1").Range("B22").Value
    wb.document.getElementById("submit").Click
     
    
        Do Until Not wb.Busy And wb.ReadyState = 4
            DoEvents
        Loop
    End Sub

    Thanks

  23. #23
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    in both those codes you have dim ie as objec

    ie will always be nothing so a new instance will be created

    see post #10
    you need to always use the same ie object for all subs
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  24. #24

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    I have used this code on my vba..but its only open new window...
    Code:
    Dim IE As Object

  25. #25
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    as in post #10, did you put it in the general section at the top?

    as long as it is in every sub each ie object is separate, in scope only for the single procedure, each separate ie object is a separate window

    there must only be ONE ie object dimensioned in the general section
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  26. #26

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi Wesconn
    Sorry for the Delay..Due to some Personal issues i can't reply you to the right time.

    Actually till now this will not working. this vba open only one tab and it doesn't login automatically.
    I have attached one sample file with your VBA code could please check the File?
    Sample.zip

    Note: In my office Excel Application don't have Tools-->Reference Option in VBA.


    Thanks

  27. #27
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    Note: In my office Excel Application don't have Tools-->Reference Option in VBA
    yeah, you will have it somewhere in the ribbon, i will look later, though i have no idea now, what this referred to
    i will also try to test at the same time
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  28. #28
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    Note: In my office Excel Application don't have Tools-->Reference Option in VBA.
    it is still there in excel 2013, on the menu bar

    I looked at your sample project, you have still ignored the above posts about where to dimension the IE object, and have dim ie as object within your procedure, I was able to make the sample work, by changing the value of intab before the second navigation, which then opened in a second tab

    I can assure you that it will never open in a new tab, while you create multiple instances of IE
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  29. #29

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Reference Button is there available but don't have access on my Work system.
    So i got Error on your Code of post #6

    Can we open all the web pages first and then login one by one?
    Is it possible?

  30. #30
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    Can we open all the web pages first and then login one by one?
    Is it possible?
    yes!

    So i got Error on your Code of post #6
    what error? on which line?, i do not see anything there that should need a reference set
    Last edited by westconn1; Nov 22nd, 2017 at 03:12 PM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  31. #31

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Thanks for the kind Answer..
    Can you please create vba code for this...?

  32. #32

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Hi westconn
    Could you please help me on this?

  33. #33
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VBA for open multiple webpage in new tab (IE)

    i do not believe i can help you, i have posted various code samples that worked fine in XP and with some issues in W10, all of which i tested, but none can work for you, so you need to find someone more competent than me to make it work on your machine
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  34. #34

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    108

    Re: VBA for open multiple webpage in new tab (IE)

    Thanks Westconn for your kind help.

    I'll try my best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width