Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dave Bailey
 
Posts: n/a
Default VBA loop is killing me!

Hi,

I am trying to pull in multiple XML feeds into one spreadsheet.

I start the macro and then do the following -

I am using data - XML - Import

After I get to the prompt, I type in http://rss.news.yahoo.com/rss/world and
OK

On the Import Data screen, I go to Properties and check append new data to
existing XML lists and OK

Next, I would like to import another XML list. For example
http://rss.news.yahoo.com/rss/nasashuttle and
http://rss.news.yahoo.com/rss/health.

Can someone send the VBA code that would allow me to do this. Later I can
substitute other URLs.

My current macro does not do this and it would be great to know how to do
this!

Thank you!

Dave
  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

try this sub . copy this in vb editor and run
when the input box comes you can type any one of these
world
nasashuttle
health

or any other item which brings the webpage

this downloads the whole webpage. perhaps there are more elegant ways

code begins

Public Sub test()
ActiveSheet.UsedRange.Clear 'this celars previosu downloaded page
Dim item As String
item = InputBox("type last item")
With ActiveSheet.querytables.Add(Connection:= _
"URL;http://rss.news.yahoo.com/rss/" & item,
Destination:=Range("A1"))
.Name = item
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True

.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
Range("a1").Select
msgbox "macro over"
End Sub

mine windows 98se excel 2000


--
remove $$$ from email addresss to send email


"Dave Bailey" wrote in message
...
Hi,

I am trying to pull in multiple XML feeds into one spreadsheet.

I start the macro and then do the following -

I am using data - XML - Import

After I get to the prompt, I type in http://rss.news.yahoo.com/rss/world

and
OK

On the Import Data screen, I go to Properties and check append new data to
existing XML lists and OK

Next, I would like to import another XML list. For example
http://rss.news.yahoo.com/rss/nasashuttle and
http://rss.news.yahoo.com/rss/health.

Can someone send the VBA code that would allow me to do this. Later I can
substitute other URLs.

My current macro does not do this and it would be great to know how to do
this!

Thank you!

Dave



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do Loop BobBarker Excel Worksheet Functions 0 August 19th 05 08:44 PM
Do Loop BobBarker Excel Worksheet Functions 0 August 19th 05 07:45 PM
Do Loop BobBarker Excel Worksheet Functions 0 August 19th 05 06:54 PM
VB for excel, how do I loop through code steve hobden via OfficeKB.com Excel Discussion (Misc queries) 2 June 9th 05 01:59 PM
loop trough e-mail address list to send task lists with outlook Paul. Excel Discussion (Misc queries) 2 April 14th 05 11:48 AM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"