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 <
> [email protected] <javascript:>> 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
>>
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/excel-macros.
>> For more options, visit 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.