|
-
Aug 28th, 2001, 01:38 PM
#1
Thread Starter
New Member
HTML files not being displayed
Hi all,
I posted a similar question in a different forum, but didn't get a response so I thought I'd try this one.
I have a label that displays a name and a command button on one form. When user clicks the button, I want the HTML page that corresponds to the name in the label to be displayed in a web browser on a separate form.
ie. The name in the label is 'Alaunia', when command button is clicked the HTML file Alaunia_NEW.html is to be displayed on a separate form in a webbrowser.
Here's the code I have,
Private Sub Form_Load()
If lblShip1.Caption = "Anna Salen" Then
WebBrowser1.Navigate ("C:/Documents and Settings/itcoop/Desktop/kiosk/Ships HTML pages/wallofships_grigori/shipsmain/Anna_Salen_NEW.htm")
End If
If lblShip1.Caption = "Andes" Then
WebBrowser1.Navigate ("C:/Documents and Settings/itcoop/Desktop/kiosk/Ships HTML pages/wallofships_grigori/shipsmain/Andes_NEW.htm")
End If
End Sub
etc.
(lblShip1 contains the name by way of a string from other form)
When I click the command button, I get "Page Cannot Be Displayed", however, when I block out the If Statements, the second HTML file "Andes" is displayed.
Am I not able to use If statements with the webbrowser control ?(was told I could) How can I fix this code or code my command button to do what I want?
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|