Getting the application - defined or object - defined error while execution. Sub GetTable() dataarr = Range("A1:A3") 'Change according to your criteria For i = 1 To UBound(dataarr, 1) If counter = 0 Then store_value = dataarr(i, 1) counter = 1 MsgBox store_value Else store_value = store_value & Chr(13) & dataarr(i, 1) End If Next MsgBox store_value Dim ieApp As InternetExplorer 'Dim ieDoc As Object Dim ie As Object Dim ieDoc As Object Dim strReturnBody As String Dim MyObject As Object ' Create object variable. Set MyObject = Sheets(1) Set ie = CreateObject("InternetExplorer.application") ie.Visible = True ie.navigate " http://sbm/BizSolo/OrderProcessStatusQuery/EnterQuery.jsp?dummy=false<http://dm4cqv.on.bell.ca:30011/sbm/BizSolo/OrderProcessStatusQuery/EnterQuery.jsp?dummy=false>" ' website where I'm pasting the data's to be queried Do Loop Until ie.ReadyState = READYSTATE_COMPLETE Application.Wait DateAdd("s", 3, Now) While ie.Busy DoEvents Wend ie.Document.getElementById("SB_Name").Click ie.Document.getElementById("SB_Name").Click Application.Wait (Now + TimeValue("0:00:10")) ie.Document.getElementById("orderNumber").Value = store_value Application.Wait (Now + TimeValue("0:00:1")) ie.Document.getElementById("SB_Name").Click Application.Wait (Now + TimeValue("0:00:20")) With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http:///DisplayQueryResult.jsp?dummy=false" _ , Destination:=Range("B1")) ' webpage where I'm getting the result of the data's queried .Name = "DisplayQueryResult.jsp?dummy=false" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = """table1"",2,4" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub
-- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.