MS Access Form with Webbrowser Control Popup New IE Window, Access 2010/VBA - vba

I have struck with one issue not finding any workable solution. Googled a lot without any success…HELP PLEASE.
Situation: Using MS Access 2010, there is one Form with WebBrowser Control (Unbound) for conducting some search, when I click the results of the search a Pop-up new Internet Explorer window opens for the search result.
Requirement: I need “new Internet Explorer window” needs to be opened on existing WebBrowser Control..... NOT to open separately as new pop-up Internet Explorer window.
Kindly provide me solution (MS Access 2010/VBA) or workaround….
Regards,
Sandy

Can you open the form that you are opening in the WebBrowser Control in a new browser window outside of the application in order to test something. Check to see, if when you open the url, and then invoke the search, if the results open in a new window for that browser. If so, then check the target of the form within the first screen to get the name of the window that the page is trying to open the results in. If the target is specified, then you will need to write code to remove it when the page loads.

Just assign the new web address to your webbrowser control. something like this. Note it has to include equal sign and a hyper-link surrounded by quote.
Private Sub WebBrowser34_Click()
Me.WebBrowser34.ControlSource = "='www.google.co.uk'"
End Sub

Related

Excel VBA to change internet explorer advanced settings

My current program that I am using, from excel, navigates to a web page where it downloads a lot of information. I primarily do this from excel because the data is in excel format.
I have it go to the page, click on a link and the open/save/cancel dialog box appears it automatically selects save and saves it to the last folder I saved anything in. Then it waits for the dialog box title to read "download complete" then close it and initiates the next download.
The issue I'm running in to, is that other people who use this program have the "close dialog box when download completes" option selected, and this interrupts the overall process.
Is there a way to change this setting from the excel VBA code, or will I need to explore a different method of dealing with this issue? Having the program do a direct download URL string is also not viable as the website needs to be logged in to and the request must come from the open window, (I have already attempted that method).
Use URLDownloadToFile to download from the internet, trying to use IE will lead to other issues:
VBA - URLDownloadToFile - Data missing in downloaded file

Coded UI Test Fails to find Wpf Popup Window controls

I am trying to automate a ribbon control in power point. In that ribbon there are popup windows which contains settings information, when I try to automation those setting popup windows using Coded UI, I got error message like "the control cannot be located playback fail to find control with give search properties", But Coded UI can find the popup window but it fails to find any controls inside it.I have already tried with
SearchConfiguration.AlwaysSearch and setfocus()
Does any one have solutions, it will be very helpful for me!
Find the parent object, i.e the popup window, and enumerate through the children objects manually if codedUI is not able to locate the objects.
IEnumerator<UITestControl> appt = uiMainWindowControl.GetChildren().GetEnumerator();

Can I/How do I show a webpage in an excel form?

I making a spreed sheet to evaluate user experience of a web page. I am wondering, can I have the user open a workbook, have a form pop-up show a webpage in one portion and have questions in another portion. The webpage has to be active and not an image. If it is doable, can I be provided direction in terms of another post or website? Thank you.
It is possible. You should use the WebBrowser control in your Userform.
In the VBE, go to Tools, then Additional Controls. Enable Microsoft Web Browser.
A new icon in your Toolbox should show up. It's the WebBrowser control. Add it to your userform.
Code is up to you. Sample follows:
Private Sub UserForm_Initialize()
Me.WebBrowser1.Navigate "http://www.google.com"
End Sub
The above code navigates the control to Google when you start up the userform, like so:
Hope this helps.
Use the WebBrowser ActiveX control. See http://msdn.microsoft.com/en-us/library/aa752043(v=vs.85).aspx

VB.Net button open multiple user and auto login in different window of IE

I have a website stored 100 users ....now i want to create a VB form with 100 buttons ....while i click button1, it will open IE then log in users1 automatic and when i click button2 , it will open IE then log in as user2 automatic. user3 until user100 the same ....click from button on vb form.
Note : i am already done to set open IE and log in as different users in each windows but now i am finding how to set auto log in with different users in the same website when i click each button in form.
i have something more about form....i will use ( 100 button click = 100 users = 100 IE window ....)
it depend on user click on button that he need to log in......because we don't know that what button/users/time will he want to click .....
I really need your help urgently...
Thank in advanced.
here is some code of Button_Click
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Using p As New Process
p.StartInfo.FileName = "C:\Program Files\Internet Explorer\iexplore.exe"
p.StartInfo.Arguments = "http://test.com"
p.Start()
End Using
This is the only way I can come up with on how to solve this.
My guess is that your login is using POST variables, it's pretty much standard.
To make this work you would have to allow the username and password to be supplied with GET. That is, sending them in the url like this:
http://test.com/login.php/asp?username=username&password=password
Since you haven't specified whether you use PHP or ASP.NET I will add info on how to get the value for both:
ASP.NET
Request.Querystring("username")
PHP
$_GET["username"];
EDIT based on comment
You are correct it is not possible to isolate separate webbrowser controls.
I would suggest you look into either WaTin to control separate IE instances, or Awsomium .NET, which i believe allows separate sessions in 1.7, though i haven't tested it.
Also be aware that since IE8 session cookies are shared across instanced by default, so you would need to run them with the -nomerge flag. WaTin supports this.
Based on the fact that you have not mentioned this in your question, i am presuming you are using IE7. If that is the case, and this application is not intended to be used on other machines, it should be possible to create a separate application with an embeded webbrowser control, then launch multiple insatances of that application from the main one, so you can add your own communication mechanism, but WaTin is probably a far better idea
OLD ANSWER:
It is very hard to work out what you want to do, but im guessing you want to create a winforms app, that lets you to choose a user account, and then open a browser and login to a website with that account.
Based on that assumption, my suggestion would be to have one button, and some way of selecting the account, say a comboBox, and a webbrowser control:
http://img198.imageshack.us/img198/888/66649645.jpg
Rather than 1 button per user account and trying to manipulate an external browser.
If this is indeed what you want to do, comment and i will edit my answer as required, and provide starting code if you need, but i cant do that without really undertanding what you need to do.

C# webbrowser control: page opens new window but it won't work

I use a webbrowser control (in C# - latest version of visual studio and .NET) to allow me to read and write data to a specific web page. Everything is OK until I reach the point that the page attempts to open a pdf document in a new window (the page contains javascript code).
The new window opens OK on my IE. But nothing appears when the webbrowser control opens the new window...
I've tried setting firefox as my default browser to see if it makes any difference but no good came out of it. The webbrowser control still opened IE.
I've tried catching the event of the new window and refer the url to another webbrowser control... no success again!
How can I get the pdf document? And why would the new window open but not display the pdf?