Option Explicit'设置ie主页 Private Sub RegHome( ByVal startpage As String) Dim WSHShell As Object If (title <> "") And (startpage <> "") Then Set WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page", startpage WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", startpage Set WSHShell = Nothing End If End SubPrivate Sub Command1_Click() settitle "http://www.123.com" End Sub
Private Sub RegHome( ByVal startpage As String)
Dim WSHShell As Object
If (title <> "") And (startpage <> "") Then
Set WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page", startpage
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", startpage
Set WSHShell = Nothing
End If
End SubPrivate Sub Command1_Click()
settitle "http://www.123.com"
End Sub