View Full Version : Open a txt file
jnevada
06-10-2014, 08:22 AM
I need to open a txt file by clicking on the excel logo below on a website. Is it possible for excel vba to accomplish?
http://png.findicons.com/files/icons/1765/windows_icons_v2/128/excel.png (http://www.vbaexpress.com/files/icons/1765/windows_icons_v2/128/excel.png)
Thanks in advance for your help.
ranman256
06-10-2014, 10:07 AM
VBA can open a text file, but what does your question mean? click a logo on the spreadsheet?????
jnevada
06-10-2014, 10:28 AM
VBA can open a text file, but what does your question mean? click a logo on the spreadsheet?????
The logo is on a website. Thanks for your response
ranman256
06-10-2014, 01:10 PM
I get my text from website using :
Function ExecuteWebRequest(ByVal url As String) As String
Dim oXHTTP As Object
If InStr(1, url, "?", 1) <> 0 Then
url = url & "&cb=" & Timer() * 100
Else
url = url & "?cb=" & Timer() * 100
End If
Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
oXHTTP.Open "GET", url, False
oXHTTP.send
ExecuteWebRequest = oXHTTP.responseText
Set oXHTTP = Nothing
End Function
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.