Can I assume that you are using the browser object?
so to navigate you have a text box called addess
and you navigate to a page you simply call the line
If so there are two ways you could do this...
to set a static home page that you can't change see this code...
address.text = "http://www.google.com"
To have a home page that you can set I suggest you use an INI file to store the variable page...
to do this...
frist create a module insode the program with this code in it
' Below function is used to READ from INI file
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
' Below function is used to WRITE to INI file
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Now put this code into the main form code...
To set the homepage from an address that is in the addressbar (address)
Dim lpAppName As String
Dim lpKeyName As String
Dim lpBuffer As String
Dim lpFileName As String
Dim ret As Long
Dim nSize As Long
temp$ = Dir("C:\windows\browsersettings.ini")
'the file size should only be that of the title, if this has changed the file already exist so take no action.
If temp$ <> "browsersettings.ini" Then
'create blank file
Open "C:\windows\browsersettings.ini" For Output As #1
'print text in INI file
Print #1, "[Homepage]"
Print #1, "address=http://www.google.com"
Close #1 'Close the file...
'Fill the INI variables with the appropriate info...
lpAppName = "Homepage" 'The section of the INI...
lpKeyName = "address" 'The line in the section of the INI...
lpFileName = "C:\windows\browsersettings.ini" 'The location of the INI...
address.text = lpKeyName
private Sub Goto-home-page_click()
lpbuffer = space(255)
'read homepage values from INI file
ret = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, lpBuffer, nSize, lpFileName)
*note this isn't tested...