ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð±Ð¦p¦ó¨Ï¥ÎVBA­×§ïIE ªºPROXYªº³]©w¡H¡H¡H

[µo°Ý] ½Ð±Ð¦p¦ó¨Ï¥ÎVBA­×§ïIE ªºPROXYªº³]©w¡H¡H¡H



°õ¦æ proxyÃö³¬ µ{§Ç¡A¦A°õ¦æproxy¥´¶} µ{§Ç¡A­«¶}IE«á¡A
(1)½Ð±Ð¦p¦ó¤£Åý  4. ªº¦ì¸m {ªñºÝºô§}¤£¨Ï¥ÎProxy(B)} ªº¤Ä¿ï¤£­n¤£¨£¡H
(2)½Ð±Ð¦p¦ó¦bµ{¦¡ùس]©w {ªñºÝºô§}¤£¨Ï¥ÎProxy(B)}ªº¤Ä¿ï¿ï¶µ ¬°¥´¤Ä©Î¤£¥´¤Ä¡H

5.ªº¤º®e {§t¦³¤U¦C°_©l¤å¦rªº¦ì§}¤£¨Ï¥ÎProxy} ¤]·|¤£¨£
(3)½Ð°Ý  ¦p¦ó³]©w 5.ªº¤º®e ¤£­n¤£¨£¡H
(4)©Î¦p¦ó¦bµ{¦¡ùس]©w {§t¦³¤U¦C°_©l¤å¦rªº¦ì§}¤£¨Ï¥ÎProxy} ªº¤º®e¡H

¬ÛÃöµ{§Ç½X¦p¤U¡G
102.2.27-°Ý°ÝÃD.rar (6.78 KB)

¸U¤À·PÁÂ~~¡I

ª¦¤å¤F¦n¤[~_~  ¨ÌµM§x´b´£¨Ñ¤U¦C§Þ³N¤å¥ó¡C
³Â·Ð¦U¦ì¥ý¶i«üÂI°g¬z

http://technet.microsoft.com/zh-tw/library/ff699052.aspx

TOP

¦^´_ 2# vesperlee
À°§Aª¦¤å¤F  ->§Þ³N¤å¥ó¡Chttp://technet.microsoft.com/zh-tw/library/ff699052.aspx
°õ¦æVBA ªºµ{§Ç«á,¦p­n¨ì IE¬d¬Ý[³s½u]³]©wªº§ïÅܮɳ£¶·«ö¤U¨C¤@¤lµøµ¡ªº[½T©w]Áä , ·í¦A¦¸ªº°õ¦æ VBA ªºµ{§Ç§@§ïÅܤ~·|¦³§@¥Îªº
  1. Option Explicit
  2. Const HKEY_CURRENT_USER = &H80000001
  3. Sub proxyÃö³¬()
  4.        '»Ý­×§ïªº³¡¥÷ proxy.hinet.net:80 (¥]§tPort)'  ,1¬°­P¯à¡A0¬°°£¯à
  5.     ProxySettings "proxy-n1.google.com.tw:3125", 0
  6. End Sub
  7. Sub proxy¥´¶}()
  8.        '»Ý­×§ïªº³¡¥÷ proxy.hinet.net:80 (¥]§tPort)'  ,1¬°­P¯à¡A0¬°°£¯à
  9.      ProxySettings "proxy-n1.google.com.tw:3125", 1
  10. End Sub
  11. Public Sub ProxySettings(ByRef strAddress As String, ByRef intSwitch As Integer)
  12.     Dim strComputer As String, objRegistry As Object, strKeyPath As String, strValueName As String, dwValue As Integer, strValue As String
  13.     strComputer = "."
  14.     Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
  15.     strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
  16.     strValueName = "ProxyEnable"
  17.     dwValue = intSwitch
  18.     objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue
  19.     strValueName = "ProxyServer"
  20.     strValue = strAddress
  21.     objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
  22.     strValueName = "ProxyOverride"
  23.     '5.ªº¤º®e {§t¦³¤U¦C°_©l¤å¦rªº¦ì§}¤£¨Ï¥ÎProxy}
  24.     strValue = "MyTest...."  '¼g¤J¦ì§}
  25.     'strValue = "<local>"  '²M°£¦ì§}
  26.     objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
  27. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD