When I run this macro the web page comes up but it is distorted.
What am I doing wrong.
MaxSub OpenHTMLpage() 'set the URL you want below Application.Workbooks.Open "http://etfconnect.com" Columns(1).ColumnWidth = 50 End Sub
When I run this macro the web page comes up but it is distorted.
What am I doing wrong.
MaxSub OpenHTMLpage() 'set the URL you want below Application.Workbooks.Open "http://etfconnect.com" Columns(1).ColumnWidth = 50 End Sub
Max,
your code seems to be right. The problem is that its pointing to a non html page, thats why you get some distortion.
Look at this KB for more details: http://www.vbaexpress.com/kb/getarticle.php?kb_id=295
Best Regards,
Carlos Paleo.
To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.
If Debugging is harder than writing a program and your code is as good as you can possibly make
it, then by definition you're not smart enough to debug it.
http://www.mugrs.org
Ok I understand that it is not opening to a html page. How can I get a non html page to open in my ss?
Max
Hi tenspeed,
The point in opening a web page as a s/s is basically to use it to do something like (say) search for something on that page and not merely to just view it.
This particular page comes up (albeit distorted) so you can still search (or whatever). If you play around with the column widths (drag them in or out) you may probably be able to remove the distortion - for THAT site - if you visit that site often, you can then put the column widths into your procedure and that's fine - but for that site...
If you simply want an undistorted view of it, you'd be better off calling up IE >
HTH,Sub ConnectToETF() Dim ie As Object Set ie = CreateObject("InternetExplorer.Application") On Error GoTo 1 With ie .Navigate "http://etfconnect.com" .Visible = True End With Set ie = Nothing Exit Sub 1: MsgBox Err.Description ie.Quit Set ie = Nothing End Sub
John
You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you
The major part of getting the right answer lies in asking the right question...
Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.
John Thanks that will work for me. Again thanks
Max
John I have tried to find the place on VBA to give you a rating. How do I get to the place
where I can give you a rating?? Good job and thanks for your time.
Max
Hi Max, my pleasure.
(it's up the top of the thread near "Thread tools" - where you can also mark your thread as solved - under "Rate thread")
Regards,
John
You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you
The major part of getting the right answer lies in asking the right question...
Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.