Set proxy Menue error.

Im trying to create a nice menue to change my proxy settings.
I get an error on line 33 - 'Object requierd"'
I dont understand why - Can you help here?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

On line 40, and again on 55, you have the command "close()".  This is not valid VBScript code.  If you're trying to drop out of the code for some reason, the command is "wscript.quit ([error code number])".  The error code is optional.

It looks like you don't need either of those lines at all.

Regarding the line number not matching up, the error code calls out line 33, which is the 33rd line of vbscript, or line 40 of the overall file.
Change to:
				set objShell = CreateObject("WScript.Shell")

Open in new window

I found a couple of other errors and corrected them
<title>MY Proxy</title>
     APPLICATIONNAME="Proxy Seclector"


	Sub Window_onLoad
        window.resizeTo 250,210
    End Sub 

    Sub SelectProxy
        For Each objOption in OptionChooser.Options
            If objOption.Selected Then
				Exit For
            End If
		Select Case Value 
			Case "1" 
				set objShell = CreateObject("WScript.Shell")
				objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", "MyServer:111"
				objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"

			Case "2" 
				set objShell = CreateObject("Shell.Application")
				objShell.ShellExecute "iexplore", "", "", "open", 1
				Set objShell = Nothing 

			Case "3" 
				Set objShell = CreateObject("Wscript.Shell")
				Set objShell = Nothing

			Case "4" 
				set WSHShell = CreateObject("WScript.Shell")
				WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", "MyServer:111"
				WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
				set objShell = nothing

			Case "5" 
				strFlag = True 
		End Select 
    End Sub


<h1>Proxy Menue</h1>
<select size="1" name="OptionChooser" >
    <option value="" style="color:#ff0000">Choose Country</option>
    <option value="1">Canada</option>
    <option value="2">Country2</option>
    <option value="3">Country3</option>
    <option value="4">Clear Settings</option>
    <option value="5">Quit</option>
<input type="button" onclick="SelectProxy" value="OK" />


Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Elad-ItAuthor Commented:
Super thanks guys!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.