Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Changinh LAN settings MYA be a security violations. One method would be to create a BAR file and then run the BAT file using the VBA function SHELL. Another method would be to run a DLL to make the changes. From VBA you can call any of the DLL functions in the windows\system32 folder by declaring the library function in VBA. ther ae plenty of examples of this on the web if you know which function you need. I can help if I 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 I 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 object is found before trying to loggin. I did this below by finding the USERNAME. the user name object would only be available if you were not 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 With -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157063 Microsoft Office Help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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.*.*.*;1 0.* 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. "joel" wrote: Changinh LAN settings MYA be a security violations. One method would be to create a BAR file and then run the BAT file using the VBA function SHELL. Another method would be to run a DLL to make the changes. From VBA you can call any of the DLL functions in the windows\system32 folder by declaring the library function in VBA. ther ae plenty of examples of this on the web if you know which function you need. I can help if I 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 I 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 object is found before trying to loggin. I did this below by finding the USERNAME. the user name object would only be available if you were not 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 With -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157063 Microsoft Office Help . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I think the answer is to automate the changing the register. He is an article on where the IE register parameters are located 'How to configure client proxy server settings by using a registry file' (http://support.microsoft.com/kb/819961) If you are able to create a bat file to change the registry settings then run the bat file from VBA. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157063 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make changes to Internet Options and how to log onto a private net | Excel Programming | |||
VBA and Internet Explorer | Excel Programming | |||
How can I make VBA scripts compatible with browsers other than Internet Explorer? | Excel Programming | |||
Internet Explorer | Excel Discussion (Misc queries) | |||
internet explorer | Excel Discussion (Misc queries) |