Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open html page from button..? 1

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

How can I open a html page from a button with VbScript?


/Kent J.
 
Short answer, Yes, you can... with a little sub from a samplescript shipped with PrimalScript.. and here is how

'======================================
Option Explicit

Dim IE, msg

msg = MsgBox ("start Internet?", vbYesNo, "Start")

if msg = vbYes then
Call CreateIE()
End If

Sub CreateIE()
On Error Resume Next
Set IE = CreateObject("InternetExplorer.Application")
ie.height=500
ie.width=500
ie.menubar=0
ie.toolbar=1
ie.navigate " ie.visible=1

Do while ie.Busy
' wait for page to load
Loop

End Sub
'======================================

Kind Regards,

Hans
 
Hi again,

I get "Can't create object" on:
Set IE = CreateObject("InternetExplorer.Application")


/Kent J.
 
Hi Again,

I had a little search on msdn.microsoft.com when i found this:

The VBScript 5.5 runtime could not instantiate the object for you because the object's class is not registered in the system registry, or one or more of the associated dynamic-link libraries (DLLs) are not available. Alternately, a DLL required by the object may be unusable, either because it can't be found, or it is corrupted.

To correct this error

1.) Make sure all associated DLLs are available. For example, the Data Access Object (DAO) requires supporting DLLs that vary among platforms. You may have to rerun the setup program for such an object.
2.) Internet Explorer may be trying to create an object for you, but you do not have the correct security permissions set in Internet Explorer. Reset the Internet Explorer security setting and try again.


(link: )

I hope this information can be of any help,

Greetz Hans
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top