【分享】自己修改的IE首页修改器
程序代码:Private Sub Command1_Click()
If Me.Text1.Text = Empty Then
MsgBox "请输入要设为主页的网址!", vbCritical, "温馨提示!"
Me.Text1.SetFocus
Exit Sub
Dim Reg As Variant '注册表对象
Dim KeyVal As String '当前键值
Dim ChnVal As String '修改后键值
Dim Key As String '目标键名
Key = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\start page" '设置目标键
ChnVal = "http://" + Text1.Text
Set Reg = CreateObject("Wscript.Shell") '获得注册表对象
KeyVal = Reg.RegRead(Key) '取得当前键值
If KeyVal <> ChnVal Then '当前键值与自设结果不符时
Reg.Regwrite Key, ChnVal, "REG_SZ" '修改键值
MsgBox "成功设置IE浏览器首页,请重启IE浏览器查看效果!", vbCritical, "温馨提示!"
End If
End If
End Sub






