Close Window
Got an Excel Question?

How To Extract Image Source Urls From Work Sheet?


Using Excel 2007

I am in the process of converting a static html website to an access database driven site.
Most pages are made up of tables containing text, hyperlinks and small thumbnail images.

I found that I can just copy and paste from the HTML into Excel and I found a macro code on the web to extract the hyperlink url.

But I am having difficulty extracting the image (thumbnail) source url.

I know very little about macro's, can anyone advise what macro code might do the job for me?

Many thanks


Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

Set a Photo/Image as an Excel Worksheet Background
One of the really cool formatting features of Excel is that you can actually set a picture from your computer as t ...
Add Image Background to a Chart in Excel
How to use an image for the background of a chart in Excel. Simple but fun way to spruce up charts. Click the desi ...
Open PDF from Excel
How to open a PDF file from a clickable button, link, or image in Excel.  This allows you to seamlessly link PDF f ...
Combine Data from Multiple Worksheets in Excel
The easiest way to combine and consolidate data in Excel. Simple method to combine data from multiple worksheets i ...

Helpful Excel Macros

Add Background Photos / Images to Comments in Excel
- Add background images and photos to your comments in Excel with this macro. This macro uses a really cool feature in Ex
Basic Web Query in Excel - Import Data from the Web into Excel
- Import data from the web into Excel with this macro. This is a basic web query macro that will import data from any web
Excel Macro that Searches Entire Workbook and Returns All Matches
- This is the ultimate Lookup Macro for Excel. It will search every worksheet in the workbook and return all of the mat
Get Values from a Chart
- This macro will pull the values from a chart in excel and list those values on another spreadsheet. This will get the s
Remove (Delete) Hyperlinks from Worksheets
- This macro will remove all hyperlinks from the active worksheet. It will delete the hyperlinks but it will not delete t

Similar Topics

Using VBA, I am trying to retrieve the contents of the Source of a web page (the same as would appear if you right-clicked on the page and chose "View Source") into a variable so I can work on it in VBA (using InStr, etc.).

The problem is I can use code such as
strHTMLText = ie.Document.body.innerText
strHTMLText = ie.Document.body.outerText
to retrieve the code, but in either case only part, not all, of the source code is captured. I need ALL the code. Is there some kind of code such as ie.Document.body.allText or similar that would perform this function?

Much obliged!

Hi Excel experts,
I am working on a worksheet, and would like to have an entire row transferred to another worksheet based upon a certain cell's value.

Having searched through the many solved threads on this site, I attempted to customize some of the code to my worksheet. Not being proficient in Macro/VBA, I failed. I figured I would ask for help, and see if anyone can provide what I am looking for.

Basically, I am attempting to construct a "work in process" file, and would like all completed work to be deleted from the work in process sheet, and transferred to a sheet that contains a running list of all work completed.

Attached is an example of what I am working on. I would like Column Q (Status) to determine if a row can be moved to a sheet that contains the list of all work completed, and eliminated from the original sheet. Once Status is updated to "Complete", it would be helpful to be able to run a macro/click a button that would perform the transfer.

Can anyone assist?


I would like to send an Excel file with hyperlinks of photo's attached to cells but when it is sent the recieving person cannot access the hyperlinks anymore. I am using 2007, I have tried to send the folder but that didn't seem to work. Any other way around this?

Hello All,

I need a macro enabled file to send HTMLbody email with pre populated text to list of receipents.

Any Idea How can i do?

Many thanks

I have an Excel workbook that was created by a former coworker. It includes a macro that, among other things, displays a message box about the 2008 file. The macro runs as soon as the file is opened. I'd like to access that macro to correct the date to 2011 and see what else, if anything, it's doing for me (it doesn't appear to do much). I can find references to creating macros to hide and unhide rows/columns and I found ways to delete all macros in a workbook, but I cannot find anything about unhiding a macro without knowing its name.

Does anyone know of a way to unhide this macro?


I would like to copy a small table from Word into one cell in an Excel
worksheet. The first column of the table is a list of numbers. I tried
converting the table into text with manual line breaks and tab stops to
divide columns and rows, but that didn't solve my problem.

Excel pastes the data into several rows. When I try to merge them, I
get a warning that the selection contains multiple data values, and
merging into one cell keeps the upper-left most data only.

What I tried that didn't work:
* Formatting the Excel cells as text before pasting the data.
* The various options for "Paste Special." The closest I got was
inserting the table as a Document Object, which could be a workaround,
I guess.
What I am saving for when all else fails:
* The obvious solution of copying row by row into one Excel cell.

The data in the table is information about my dad's medications. I
would like to have reference charts of how to identify the strength of
each tablet by its color and markings. I got the info from the
manufacturers' websites and entered it into tables in Word, which I
would like to copy into a more comprehensive file I am creating in
Excel. The first column of each table is the strength of the tablet,
entered as 1 mg., 2 mg., etc. The subsequent columns describe the
shape, color, and markings. There are 3 tables, each with about 4-5

Is there a way to copy each one - whether as a table or as text - into
a single Excel cell without losing data?

Many thanks.

I was testing the following methods (suggested in another thread) to disable copy/paste on a particular worksheet -- now copy and paste is disabled entirely from Excel and, apparently, from each and every excel workbook I've got. HELP!!!!!


Right now I have a sports league with 8 teams, I'd like to create a random 7-game schedule where each team plays the other team only once. Essentially this will be a 7-game round robin. However, I'd like to be able to use this for any number of teams and games.

I'd like to do this in Excel, but I can't figure out how to have a randomly generating non-repeating macro with text values in cells.

So right now I have a column of 8 values and need matrix of 7 columns by 8 rows next to it.

I've found this thread that has one for numbers, but I can't figure out how to do it for text values...

Thanks all!


I am copying charts to display the same information for different regions. When I work on the copied region, I find it a cumbersome task to go through each charts source data and change the cell references to the different region. Essentially I am doing a trending analysis for each region, with a region having its own sheet with 5 charts per sheet. What I have done is copy the original sheet and am updating the sheet for another regions source data by going to the source data. The source data is all in the same row/column format, but each regions source data has its own sheet. Is there a more automatic way to do this? Perhaps a way to update all 5 charts references at the same time.

Hi all,

I've had a long search through your pages to see if this question has been answered before but having browsed through about 50 pages worth of threads I couldn't see anything, but if I am repeating prior information I do apologise.

I've written a macro that is relatively simple. It just takes some information in one format, rearranges it, adds some formatting and performs some calculations. Nothing incredibly fancy but it works fine on my computer.

Now, I need to share this macro with some other people, so basically I've just sent that excel file on to the people that need to use it. Should be fine and in most cases it is, however there is one user who although they can open the file, can't seem to get the macro to run properly.

It seems to get a small way through the macro but then stop with no error messages or any sign that it hasn't completed properly.

I have checked Macro Security level and that is the same as mine, Tools - Add-Ins is the same, In Visual Basic, Tools - References is the same as mine. It is the same Operating system and the same version of Excel.

I have even signed into this person's computer as myself (it's a big company network thing) and tried to run the macro and it works fine, so there is nothing wrong with the hardware.

I've googled and searched and tried everything I can think of but I'm no closer to solving this problem, so if anyone has read through this wall of text and can come up with a possible solution, that would be greatly appreciated to save me from tearing ALL my hair out!

Thanks very much for your time.

Hi All,

I have the below code which deletes all items from a listbox and my excel sheet which is the source for populating that listbox. I am using a option button style for my listbox and the selection style as single .i.e. you can select only one item at one go in the lisbox. I want my macro to delete the selected item from my worksheet .i.e. it's entire row so that it doesn't reflect in my lisbox any more. Below is my code :


Private Sub CommandButton2_Click()
  Dim I As Long
    With ListBox1
      For I = .ListCount - 1 To 0 Step -1
       If .Selected(I) Then
           .RemoveItem I
           Sheets("URL List").Rows(I + 2).EntireRow.Delete
        End If
      Next I
End With

End Sub

Thanks a lot for your help in advance.

In Excel there is a difference between cells that are blank (= "") and that are empty. You can make blank cells empty by selecting them and pressing the delete key, but I need a fast way to do this on all blank cells in a large worksheet. The only way I have found is with a VBA macro that loops through every cell, tests for '.Value = "" ' and then uses the '.Clear()' function, but doing this on 30 columns x 10000 rows is far too slow. Any solutions?

(The reason I need to do this is for importing into Access, the database treats empty cells as NULL which is what I want. Blank (but not empty) cells screw the import process up.)

Hello everybody,

We all know we can change the source of a link of the workbook by clicking Edit>Links>Source>change source but that will change the source of all workbook formulas which are linked to a certain file, what about if i need to change the source of a single sheet? is this possible?

I appreciate your support.Thank you !

I am importing data to a cell. The data is actually html code. I would like
to display the data formatted. Right now I get all the ugly html codes, like
<b> Hello World</>.

Thanks - John


I'd like to be able to copy data from a list of websites into Excel. It would take too long to navigate to do an Excel web query for each site, so is it possible to write a macro that could do that?

Thank you!


I am trying to do a very simple copy and paste of a simple formula in Excel 2007 and nothing seems to be working. Excel will not let me copy and paste a formula and will only paste the value into to workbook. For instance, if I make a very simple spreadsheet such as:
A1 type in 10, A2 type in =A1 (calculated A2 to be 10)
B1 type in 5

And then click the copy on B1, and then click paste special on cell B2, the only options it gives me are text and unicode text and so no matter how I paste, cell b2 will always be populated with a value of 5. I cannot imagine a simpler copy and paste and no matter what I do I can't make this work.
All cells are formatted as general. It seems that all copy and pasting of formulas in my excel has been disabled. If I open any spreadsheet on my computer, I can't copy and paste formulas, but do the exact same thing on the exact same spreadsheet on any other computer and it works no problem.

Any help?

Hi all,

I'm trying to extract all the text in a cell which is on the right side of a comma (,)

Currently I am using this formula,


However it sometimes is missing some of the data after the , and sometimes pulling a few characters before the ,

any suggestions on how to correct my formula please?

Thanks in advance.

Hi guys,

Looking for some help and would appreciate your help. I want to prevent people cutting/copy/pasting on a spreadsheet I have developed. A couple of users keep doing so which in turn knackers my formulas. There will be occasions where I will need to be able to use these functions for maintenance and updates. Ideally I would like have a private marcro which I can run to enable these features as and when needed.

I've been at this all morning and feel like I'm going round in circles. I've tried various bits of code (sourced via google etc) & have ended up with a whole manner of outcomes but not the one I want.

To summaraise what I am looking for is some vba code which will do the following Disable cut,copy and paste when sheet is opened Enable cut,copy and paste when closed Have a macro which when run will allow me to cut/copy paste so as to implement updates when necessary.
Can anyone help?

Thanks in advance

Hi there, longtime user firsttime poster. Looking for some help as I am a non-expert with macros. Here's what I'm trying to do:

We have to submit things to a certain regulatory body and we usually enter tasks in as soon as they come, do the submission, and then keep a record of that submission.

So, I have a workbook with two sheets, one is "TO DO", the other is "ARCHIVE". Both sheets have the same columns and everything. I am looking for a macro that will automatically cut a (row) from the TO DO sheet and paste it in into the ARCHIVE sheet once it is done, then delete the cut row from the TO DO list so it stays topped up.

The trigger for archiving is the columns M and N which are titled "Complete ?" and each has a validation drop down that says "YES". When both cells in columns M and N have the YES in them, I would like the macro to make the above mentioned actions.

I ran a search on the forums and found something similar, but not quite what I was looking for.

Any help?

Also, I cannot move the Pivot Table from the new Worksheet it is created in, to my existing Worksheet.

I am running Excel 2011 for Mac.

I have a Worksheet with a small amount of data, and when I click the Pivot Table button it automatically creates the Pivot Table in a new Worksheet. The Pivot Table data is fine, but I want it to display alongside the source data.
I've tried using the Move Pivot Table option and choosing to Create Pivot Table in Existing Worksheet and choosing a source cell alongside my current data, but nothing appears. Also, I checked in Edit menu and found that the Pivot Table appears to have not even been created/moved because there is no option to undo it.

Appreciate any help, let me know if you have any further questions.


I can't find this solutions anywhere. I know how to send emails from Excel using VBA. When I get to the Body section, I want to insert a clickable link to a website, and also a clickable link to send an email (not as important as the website). Can this be done? I have found code to insert links to files, but none for website links.


Firstly i haven't used excel to a great extent since my college days. So i'm having to re-learn 99.9% of everything i once new...

I am volunteering for a non profit organization and trying to create a reservation system for the rooms that they have - kind of like hotel software, but in excel (i did a similiar thing in college but for plane seats)

Please find it attached.

What i need it to do:

Copy all of the info from the main page to the guest lit (a new row each time).

From the guest list to the Gannt chart - i did a few tutorials on dynamic gantt charts using conditional formatting but cannot get them to work when based on data on a different worksheet.

Finaly is there a way to check for availabilty on any given date?

if just someone could point me in the right direction, i would be appreciate it so much words can't express!!!

Best Regards,


P.S for the calender drop down on the main page, i'm using 'microsoft time & date picker 6.0) - pop ups on this site - same file, better website

Hi All,

I got the below macro which uses IE and open the URLs. I want to create a userform with listbox with radio button and commandbutton on the same which will help me to connect to each url when I select the same in listbox and click on the commandbutton.

Sub DoBrowse1()
    Dim ie As Object
    Set ie = CreateObject("Internetexplorer.Application")
    ie.Visible = True
    ie.Navigate ""
End Sub

Any suggestions..

Hi there,

I have a piece of code called ConvertDates that formats data contained on 6 worksheets. The 6 data sheets all contain a data connection to a website of foreign exchange tables.

What I want is for my code to execute as soon as the data connection refresh has finished.

When I use the statement


Application.Run "Project1.xlsm!ConvertDates"

The code executes the macro whilst the refresh is still happening, thereby screwing up my results. I don't really want to use a timed wait, because the refresh speed is going to vary from user to user.

Is there some way I can tell excel to wait till the refresh has finished and then execute the code?

Any help would be hugely appreciated.

Newbie here and I don't know where to start... I'm trying to set up a macro to when data is pasted to a TEMPLATE worksheet tab it will automatically copy and paste data to another sheet based on the month value.
For example:
If data contains 06/01/2011 in cell A1, then data needs to be pasted to "Jun" worksheet within the same workbook.

Can someone assist or can give some direction? Thank you