Nilsjohanekman
New Member
- Joined
- Nov 19, 2016
- Messages
- 8
Dear Community,
Can you please help me create a macro that does the following?:
FYI... this is where I curently am (A lot of googling, not enough understanding)"
'Prepare for retrieval of Data
Set Sht = Sheets("MasterPullTab")
RowCount = 1
Sht.Range("A" & RowCount) = "PO"
Sht.Range("B" & RowCount) = "Item"
Sht.Range("C" & RowCount) = "Supplier Part Number"
Sht.Range("D" & RowCount) = "Qty"
Sht.Range("E" & RowCount) = "Priority"
Sht.Range("F" & RowCount) = "Status"
eRow = Sheet3.Cells(Rows.Count, 1).End(x1Up).Offset(1, 0).Row
myPOtype = InputBox("Enter PO")
'Select BPP hyperlink
With ieApp
.navigate "https://www.myboeingfleet.com/partpage"
Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop
Set what = .document.getElementsByName("textfield")
what.Item(0).Value = myPOtype
.document.getElementsByClass("paddingtopone").Click
Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop
For Each ele In .document.all
Select Case ele.vAlignName
Case "top"
RowCount = RowCount + 1
End Select
Next ele
Select Case ele.className
Case "TableCellTitle"
Sht.Range("A" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("B" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("C" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("D" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("E" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("F" & RowCount) = ele.innerText
End Select
End With
Set ieApp = Nothing
End Sub
Thanks in advance!
Regards,
Nilsjohanekman
Can you please help me create a macro that does the following?:
- Enter a specific reference from a spreadsheet
- Enter it into the search field in a website
- Select the search button
- Return the output back into a new spreadsheet
FYI... this is where I curently am (A lot of googling, not enough understanding)"
'Prepare for retrieval of Data
Set Sht = Sheets("MasterPullTab")
RowCount = 1
Sht.Range("A" & RowCount) = "PO"
Sht.Range("B" & RowCount) = "Item"
Sht.Range("C" & RowCount) = "Supplier Part Number"
Sht.Range("D" & RowCount) = "Qty"
Sht.Range("E" & RowCount) = "Priority"
Sht.Range("F" & RowCount) = "Status"
eRow = Sheet3.Cells(Rows.Count, 1).End(x1Up).Offset(1, 0).Row
myPOtype = InputBox("Enter PO")
'Select BPP hyperlink
With ieApp
.navigate "https://www.myboeingfleet.com/partpage"
Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop
Set what = .document.getElementsByName("textfield")
what.Item(0).Value = myPOtype
.document.getElementsByClass("paddingtopone").Click
Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop
For Each ele In .document.all
Select Case ele.vAlignName
Case "top"
RowCount = RowCount + 1
End Select
Next ele
Select Case ele.className
Case "TableCellTitle"
Sht.Range("A" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("B" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("C" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("D" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("E" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("F" & RowCount) = ele.innerText
End Select
End With
Set ieApp = Nothing
End Sub
Thanks in advance!
Regards,
Nilsjohanekman