http://www.mrexcel.com/forum/showthread.php?p=2624084#post2624084
hi ,
i am importing some data from a web page i want two things to be done in the macro given below.
1. the page no will change to next automaticlly & "URL;http://www.medguideindia.com/show_brand.php?nav_link=&pageNum_rr=9&nav_link=&selectme=9")
2. the row no where the data is paseting will go down further automatically. ( Range("A351").Select )
here is the code.
Sub importdata()
'
' importdata Macro
' Macro recorded 2/24/2011 by arvindv
'
' Keyboard Shortcut: Ctrl+n
'
With Selection.QueryTable
.Connection = _
"URL;http://www.medguideindia.com/show_brand.php?nav_link=&pageNum_rr=9&nav_link=&selectme=9"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "15"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("2:51").Select
Selection.Copy
ActiveSheet.Next.Select
Range("A351").Select
ActiveSheet.Paste
ActiveSheet.Previous.Select
End Sub