Connecting to Popup Web Page using VBA

Posted on 2010-11-13
Last Modified: 2012-05-10
Hello Experts, we are trying to automate connecting to a website, logging in and performing certain  tasks using VBA. All is working well till we get to a particular submit button that when clicked on manually brings up a popup webpage.
The code below shows the IE source code and snippets of what we are doing in VBA. Any assistance here would be greatly appreciated.
'Here is what part of the IE source code of the submit button looks like:


<input type="submit" name="_ctl7:_ctl4:btnMemberLookup" value="Select Players For Ballot" onclick="return btnMemberLookup_onclick();if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="_ctl7__ctl4_btnMemberLookup" style="width:170px;" />


'Here is how we are connecting to the URL:

strURL = "the location of the webpage we are trying to automate"

' Create an object of type InternetExplorer

    Set objIE = CreateObject("InternetExplorer.Application")

    ' Use the Navigate method to make our IE object visit a web page (strURL=Your web page)

    objIE.navigate strURL

    ' Make the InternetExplorer window visible    objIE.Visible = True

'We are not having any problems doing other things on the form such as clicking on the following button:

'Click on View/Add Ballot


    While objIE.ReadyState <> 4 Or objIE.Busy = True




'However when we try to use VBA o the Member Lookup button it fails. We tried .submit and it doesn't work either.



    While objIE.ReadyState <> 4 Or objIE.Busy = True



Open in new window

Question by:DonGarry
  • 4
  • 3
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34149193

Author Comment

ID: 34151556
Hello boag2000:

Thanks for you reply....
I've looked at your links and still cannot find a solutions.

Here is what I have tried and still no luck:

I'm getting the error: object doesn't support this property or method (438)

Any other suggestions?
LVL 74

Accepted Solution

Jeffrey Coachman earned 500 total points
ID: 34151616
That error, most likely, has to do with code syntax.

You get this error on all of the examples you posted?
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)


Author Comment

ID: 34151670
Yes I do as a matter of fact...and I've looked at the syntax 100 times at least and am not spotting anything obvious....hmmmm
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34152412
Remember that some of those links presume that you are using a webbrowser control...
Are you?

Author Closing Comment

ID: 34161058
Well as it turns out you were right! It was a syntax problem...I guess I'm going blind.

The correct syntax to open up the popup window is indeed:
(I was missing an underscore)

Thanks for the help!
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34161541

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to put password on a button in Access 2013 4 39
Field behavior for "locked" form 12 29
DSum for Access 6 43
Library not Registered 16 42
In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now