neuroman9999
Member
- Local time
- Today, 03:01
- Joined
- Aug 17, 2020
- Messages
- 824
I did not get help for this elsewhere folks, so I wonder, does anyone here have an idea about this?
From what I can see this is not very consistent about Excel. I would like to open a URL in a browser window. the URL val is sitting in a form textbox, and the double click event of the box is this:
and I get the errors in the attached images. The first image (#1) is the error that occurs when it first breaks. If I try to run it again, at the time it is broken, I get a new error, shown in image #2. I have also tried this as a formula thrown into the box at another point in the code where I am putting the URL in it currently:
I have also tried to add TRUE to the ""new window"" arg and that does no good.
Is all this something that I have done perhaps? The textbox is enabled and not locked. I realize that both errors are saying that I should be opening a file, but I just read 3 different articles on the web that claim this method should automatically follow internet URLs and know what to do automatically. I guess one question I have NOT asked is.....does that actual string that sits in the ""url"" var have to be an actual hyperlink produced by Excel? Is it now currently just text in the textbox.
thanks.
From what I can see this is not very consistent about Excel. I would like to open a URL in a browser window. the URL val is sitting in a form textbox, and the double click event of the box is this:
Code:
Private Sub txtdoc_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim url As String
url = frmmain.txtdoc
ActiveWorkbook.FollowHyperlink Address:=url
End Sub
Code:
frmmain.formulaR1C1 = "=hyperlink(" & """" & "www.google.com" & """" & ")"
Is all this something that I have done perhaps? The textbox is enabled and not locked. I realize that both errors are saying that I should be opening a file, but I just read 3 different articles on the web that claim this method should automatically follow internet URLs and know what to do automatically. I guess one question I have NOT asked is.....does that actual string that sits in the ""url"" var have to be an actual hyperlink produced by Excel? Is it now currently just text in the textbox.
thanks.