Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This VBA should do the trick. It use a selection. It then uses the
first cell for the shape/picture and copies it over to all other cells in the selection. Just select all cells starting with your bitmap and then run this macro Sub CopyShapes() Dim rngSel As Range Dim rngHdr As Range Dim rngCell As Range Dim sht As Worksheet Dim myshape As Shape Application.ScreenUpdating = False If TypeOf Selection Is Range Then Set rngHdr = Selection.Cells(1, 1) Set sht = rngHdr.Parent ' find shape For Each myshape In ActiveSheet.Shapes If myshape.Type = msoAutoShape Or myshape.Type = msoPicture Then If Intersect(myshape.TopLeftCell, rngHdr) Is Nothing Then Else myshape.Copy Exit For End If End If Next myshape For Each rngCell In Selection.Cells If rngCell.Address < rngHdr.Address Then sht.Paste rngCell End If Next rngCell End If Application.ScreenUpdating = True End Sub DM Unseen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to use the same picture in multiple cells? | Excel Discussion (Misc queries) | |||
Charts to Image or Picture? | Charts and Charting in Excel | |||
Copy picture from image control | Excel Programming | |||
userform image from picture in worksheet | Excel Programming | |||
VBA : A picture from http://.../Image.gif | Excel Programming |