try to run the macro which add the data table first and then add

wait or load statement at the end ( before end sub) and call the web query
macro to download the data


or try these macros
http://dailydoseofexcel.com/archives/2006/11/29/html-tables/
http://stackoverflow.com/questions/12989687/fetch-website-data-into-excel-using-vba-excel-macro




On Tue, Oct 1, 2013 at 3:13 PM, Menaka Balakrishnamoorthy <
menaka.balakris...@gmail.com> wrote:

> If I record the macro, I'm getting as below but I have few steps before
> that, I want to merge the both can u pls help me on that.
>
> I want to copy the values from the excel to the webpage and the result
> table I should paste in the excel sheet. Below i have mentioned the details
>
> Recorded Macro :
> With ActiveSheet.QueryTables.Add(Connection:= _
>         "URL;http:///DisplayQueryResult.jsp?dummy=false"; _
>         , Destination:=Range("B1"))
>         .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
>
>
> Steps Before the recording:
>
> Dim rng As Range
>         Set rng = wsNew.Range("A1")
>         Dim divContent As Object
>         Dim tbData As Object
>         Dim rw As Object
>         Dim col As Object
>         Dim cl As Object
>         Dim strBaseURL As String
>
>         dataarr = Range("A2:A4") 'Change according to your criteria
>         For i = 1 To UBound(dataarr, 1)
>         If counter = 0 Then
>             store_value = dataarr(i, 1)
>             counter = 1
>         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
>
>         Set ie = CreateObject("InternetExplorer.application")
>         ie.Visible = True
>         ie.navigate 
> "http//EnterQuery.jsp?dummy=false<http://dm4cqv.on.bell.ca:30011/sbm/BizSolo/OrderProcessStatusQuery/EnterQuery.jsp?dummy=false>
> "
>         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
>         Do
>         Loop Until ie.ReadyState = READYSTATE_COMPLETE
>         Application.Wait DateAdd("s", 3, Now)
>
> On Sunday, September 29, 2013 1:12:13 PM UTC+5:30, XLS S wrote:
>
>>  Go to "Data" menu option and select in "Get External Data" From WEB
>>  and simply record macro your self.
>>
>>
>> .........................
>>
>> Enjoy
>> Team XLS
>>
>>
>>
>> On Sat, Sep 28, 2013 at 11:34 AM, Menaka Balakrishnamoorthy <
>> menaka.ba...@gmail.com> wrote:
>>
>>>
>>>
>>> HI,
>>>
>>> I want to take the data from the webpage table and paste it in my excel
>>> sheet. Can you please help in that.
>>>
>>>
>>> Regards,
>>> Menaka B
>>>
>>> --
>>> 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<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...@**googlegroups.com.
>>> To post to this group, send email to excel-...@googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/**group/excel-macros<http://groups.google.com/group/excel-macros>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>
>>  --
> 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.
>



-- 
*Regards*
* *
*Ashish Koul*


*Visit*
*My Excel Blog <http://www.excelvbamacros.com/>*
Like Us on 
Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297>
Join Us on Facebook <http://www.facebook.com/groups/163491717053198/>


P Before printing, think about the environment.

-- 
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.

Reply via email to