Home > Forum Home > Analyzing Corporate Financial Data > Macro that will automatically log me into web application > web query help Share

Web query help

Excel Help for Web Query Help in Analyzing Corporate Financial Data


Forum TopicLogin

Web Query Help

Rate this:
(2.5/5 from 2 votes)
Confusedtried your idea but it did not like your constants, stated that i have to declare them. 

Sub Login_WebQuery()
Dim MyPost As String
Const MyUrl As String = "https://www.btwholesale.com/siteminderagent/forms/login.fcc"
Const PostUser As String = "USER=" & Worksheets("Login Data").Range("C5").Value
Const PostPassword As String = "&PASSWORD=" & Worksheets("Login Data").Range("D5").Value
   
MyPost = PostUser & PostPassword
   
With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;" & MyUrl, Destination:=Cells(1, 1))
    .PostText = MyPost
    .BackgroundQuery = True
    .TablesOnlyFromHTML = True
    .Refresh BackgroundQuery:=False
    .SaveData = True
End With
   
End Sub
 Posted by on
 
View Full Post

Find relevant Excel templates and add-ins for web query help in the