Make changes to Options in Internet Explorer and log onto a networ

F

Farooq Sheri

This post requests answer to two issues.

Issue no.1
Using a macro, how can I make changes to Internet Options (specifically LAN
Settings) of Internet Explorer.

Issue no. 2
I have a code that is used to access a web page but before I can access that
web page I need to be logged on to a private DCN (Data Communication
Network). Is there a way to log on using a macro.

Thanks and regards
 
J

joel

Changinh LAN settings MYA be a security violations. One method would b
to create a BAR file and then run the BAT file using the VBA functio
SHELL. Another method would be to run a DLL to make the changes. Fro
VBA you can call any of the DLL functions in the windows\system32 folde
by declaring the library function in VBA. ther ae plenty of examples o
this on the web if you know which function you need. I can help if
knew a little bit more of what you are trying to accomplish.

Web loggins are usually aFORM on the webpage. If you gave me the URL
can help. I recently did this for a Yahoo Mail account shown below.
this code would ned to be modified for your website.

Some sites stay loggin so you need to test if one of the login objec
is found before trying to loggin. I did this below by finding th
USERNAME. the user name object would only be available if you were no
logged in.


Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

'get web page
IE.Navigate2 URL
Do While IE.readystate <> 4 Or _
IE.busy = True

DoEvents
Loop

'login
With Sheets("Main")
Set UserName = IE.document.getelementbyid("username")
If Not UserName Is Nothing Then
UserName.Value = .Range("DefaultEmail")

Set PasswordBox = IE.document.getelementbyid("passwd")
PasswordBox.Value = MailForm.PasswordBox

Set form = IE.document.getelementsbytagname("Form")
form(0).Submit

Do While IE.readystate <> 4 Or _
IE.busy = True

DoEvents
Loop

End If
End Wit
 
F

Farooq Sheri

Thanks for your response. For the first part of I need to change the
following in the LAN settings.

(1) I need to uncheck "Use automatic configuration script"
(2) Check "Automatically detect settings".
(3) on the Advanced tab I need to enter some rules such as
*.waridtel.com;*.warid.com;*.wt.wi.pri;172.*.*.*;10.*

For the second problem the network I need to log on to is not accessible via
web; rather it is my organization's private network (VPN sort of network). I
click an icon which then pops up a login window. Thus it might not be easy to
modify your code to meet my requirement.
 
J

joel

I think the answer is to automate the changing the register. He is a
article on where the IE register parameters are located


'How to configure client proxy server settings by using a registr
file' (http://support.microsoft.com/kb/819961)


If you are able to create a bat file to change the registry setting
then run the bat file from VBA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top