Importing Web Page

Q

qcan

Hi All,

JLGWhiz was nice enough to make a small macro for me (see below) based
on a request a few days back. JLGWHIZ made the macro according to my
request and it works perfectly as is. Unfortunatly, I was not
completly clear with my request. What I actually wanted was the
contents of the URL (go to web page and import web page as is), not
the actual URL itself. Please refer to below.

Can someone help ?

Thanks.

****************************

Hi, I need some help & guidance please. Although I
can record a macro and make minor modifications with the code, I know
next to nothing about VBA programming.

I am looking for a simple macro (I hope) that would look into a
specific sheet (called main) that
would contain a unique URL on each line that I would like to inport
into another spreadheet (called MAIN2). Each time it does this, I
would like it to add to column "Z" the URL that it pertains to. Once
done, it would once again go to main and look for the next line that
conatins yet another unique URL and then would return the data back to
the next available row etc etc. Thanks.

******************************

Newsgroups: microsoft.public.excel.programming
From: JLGWhiz <[email protected]>
Date: Mon, 25 Feb 2008 13:17:02 -0800
Local: Mon, Feb 25 2008 4:17 pm
Subject: RE: Web Scraping With Loops
Reply | Reply to author | Forward | Print | Individual message | Show
original | Report this message | Find messages by this author
Are all of the unique URLs in a single column in Sheets("Main")?

If so, assume they are in column A. If they are in another column
you will neet to modify the code below:


Sub URLMain2()
Dim c As Range, lr As Long
lr = Sheets("Main").Cells(Rows.Count, 1).End(xlUp).Row
For Each c In Sheets("Main").Range("A2:A" & lr)
If Not c Is Nothing Then
c.Copy Sheets("Main2").Range("Z" & Cells(Rows.Count, 26) _
.End(xlUp).Row + 1)
End If
Next
End Sub
 
D

Don Guillett

Give your url(s) and your list or send your workbook to my address below.
You probably just need to sub a variable to the ONE url. This is the sort of
thing I do for my clients on a daily basis.

myurl=xxxxxxxxxxx" & myvar & "restofurl"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top