Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like the following. I used the macro recorder in Excel 2000
to generate a lot of this, which uses the Pictures object. It is no longer the recommended object (Microsoft now recommends the Shape object), so you might want to experiment with putting the picture in a Shape object (or whatever is now current if you are using Excel 2007!). '---------------------------------------------------------------------- Sub ConvertToPictures() Const GIF_Folder = "C:\My Documents\Humor\GIF\" Dim rngCell As Range Dim rngPictureNames As Range Set rngPictureNames = ActiveSheet.Range("C1:C3") For Each rngCell In rngPictureNames ConvertTextToPicture rngCell, GIF_Folder, rngCell.Value Next rngCell Range("$A$1").Activate End Sub '---------------------------------------------------------------------- Sub ConvertTextToPicture(rngCell As Range, _ strFolder As String, _ strPictureName As String) rngCell.Activate On Error GoTo ExitSub With rngCell.Parent .Pictures _ .Insert(strFolder & strPictureName & ".gif"). _ Select Selection.Name = strPictureName End With 'Remove cell text (it has been replaced by the GIF). rngCell.Value = "" ExitSub: End Sub -- Regards, Bill Renaud |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding values in first "X" number of rows dynamically | Excel Worksheet Functions | |||
How do I test values in 2 different columns in a "sumif" formula? | Excel Discussion (Misc queries) | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Debug.Print "Test " vbCodeLineNumber & ": " & varName | Excel Programming | |||
Looking for VB code to test for "RING" , "BUSY" disconnects or other signals | Excel Programming |