Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Duplicate a picture image into multiple cells

I have a workbook with 30 identically formatted pages (when printing out) on
three separate worksheets (10 pages per worksheet). Each page also includes
a graphic image of a logo we use. Occasionally, I need to change the logo to
a different image .bmp and have to delete the old and paste the new by hand
30 times. I'm looking for a way to have one location where I can put just
one copy of my image and then have it somehow magically duplicate itself into
the appropriate cells on each of the 30 pages. I've already examined the
info on the McGimpsey website for displaying a picture based on a cell value.
This works wonderfully for displaying just one copy of the image, but I need
to make 30 of them and have them display in their correct locations. Is there
a way to do this?
Thanks in advance for any advice!
--
Susan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Duplicate a picture image into multiple cells

Are you using rows to repeat at top in the last dialog of page setup?

If not, that could get you down to 3 locations.

--
Regards,
Tom Ogilvy

"SueDot" wrote in message
...
I have a workbook with 30 identically formatted pages (when printing out)

on
three separate worksheets (10 pages per worksheet). Each page also

includes
a graphic image of a logo we use. Occasionally, I need to change the logo

to
a different image .bmp and have to delete the old and paste the new by

hand
30 times. I'm looking for a way to have one location where I can put just
one copy of my image and then have it somehow magically duplicate itself

into
the appropriate cells on each of the 30 pages. I've already examined the
info on the McGimpsey website for displaying a picture based on a cell

value.
This works wonderfully for displaying just one copy of the image, but I

need
to make 30 of them and have them display in their correct locations. Is

there
a way to do this?
Thanks in advance for any advice!
--
Susan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Duplicate a picture image into multiple cells

No, unfortunately, I can't - although each page is identically formatted, the
text is different, so I can't use repeated rows.
--
Susan


"Tom Ogilvy" wrote:

Are you using rows to repeat at top in the last dialog of page setup?

If not, that could get you down to 3 locations.

--
Regards,
Tom Ogilvy

"SueDot" wrote in message
...
I have a workbook with 30 identically formatted pages (when printing out)

on
three separate worksheets (10 pages per worksheet). Each page also

includes
a graphic image of a logo we use. Occasionally, I need to change the logo

to
a different image .bmp and have to delete the old and paste the new by

hand
30 times. I'm looking for a way to have one location where I can put just
one copy of my image and then have it somehow magically duplicate itself

into
the appropriate cells on each of the 30 pages. I've already examined the
info on the McGimpsey website for displaying a picture based on a cell

value.
This works wonderfully for displaying just one copy of the image, but I

need
to make 30 of them and have them display in their correct locations. Is

there
a way to do this?
Thanks in advance for any advice!
--
Susan




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Duplicate a picture image into multiple cells

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

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
How to use the same picture in multiple cells? Need Help in DC Excel Discussion (Misc queries) 6 June 22nd 06 02:17 PM
Charts to Image or Picture? Bill Elerding Charts and Charting in Excel 2 May 5th 05 12:54 PM
Copy picture from image control Ian[_14_] Excel Programming 4 February 8th 05 02:48 PM
userform image from picture in worksheet Doug Glancy[_5_] Excel Programming 2 November 10th 03 04:43 AM
VBA : A picture from http://.../Image.gif VUILLERMET Jacques Excel Programming 2 October 1st 03 09:24 PM


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

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

About Us

"It's about Microsoft Excel"