Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DD DD is offline
external usenet poster
 
Posts: 68
Default Make same picture appear more than once

Hi I have the macro working for inserting different pictures but what if I
want to see the same picture output more than once without changing the
picture name.
In another worksheet, I have the a list with the name and picure number.
When the name matches the corresponding picture, it will show but for
example, if there were three of the same name only one picture will show and
the other two will be blank.

Below is the code I'm using.

Private Sub Worksheet_DD()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B16")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("B22")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With

and continues with more coding

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Make same picture appear more than once

dd,

You need to copy and paste the picture, then name it in a way that you can later delete it (so, no,
you cannot output it more than once without changing the picture's name).

I have an example workbook that shows the technique. Email me privately and I will forward it to
you. (Reply, then take out the spaces and change dot to .)

HTH,
Bernie
MS Excel MVP


"dd" wrote in message
...
Hi I have the macro working for inserting different pictures but what if I
want to see the same picture output more than once without changing the
picture name.
In another worksheet, I have the a list with the name and picure number.
When the name matches the corresponding picture, it will show but for
example, if there were three of the same name only one picture will show and
the other two will be blank.

Below is the code I'm using.

Private Sub Worksheet_DD()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B16")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("B22")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With

and continues with more coding

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
DD DD is offline
external usenet poster
 
Posts: 68
Default Make same picture appear more than once

Bernie
I emailed you.
Thanks

"Bernie Deitrick" wrote:

dd,

You need to copy and paste the picture, then name it in a way that you can later delete it (so, no,
you cannot output it more than once without changing the picture's name).

I have an example workbook that shows the technique. Email me privately and I will forward it to
you. (Reply, then take out the spaces and change dot to .)

HTH,
Bernie
MS Excel MVP


"dd" wrote in message
...
Hi I have the macro working for inserting different pictures but what if I
want to see the same picture output more than once without changing the
picture name.
In another worksheet, I have the a list with the name and picure number.
When the name matches the corresponding picture, it will show but for
example, if there were three of the same name only one picture will show and
the other two will be blank.

Below is the code I'm using.

Private Sub Worksheet_DD()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B16")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("B22")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With

and continues with more coding

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Make same picture appear more than once

I am having exactly the same problem. Could you email the example worksheet.

Many thanks

"Bernie Deitrick" wrote:

dd,

You need to copy and paste the picture, then name it in a way that you can later delete it (so, no,
you cannot output it more than once without changing the picture's name).

I have an example workbook that shows the technique. Email me privately and I will forward it to
you. (Reply, then take out the spaces and change dot to .)

HTH,
Bernie
MS Excel MVP


"dd" wrote in message
...
Hi I have the macro working for inserting different pictures but what if I
want to see the same picture output more than once without changing the
picture name.
In another worksheet, I have the a list with the name and picure number.
When the name matches the corresponding picture, it will show but for
example, if there were three of the same name only one picture will show and
the other two will be blank.

Below is the code I'm using.

Private Sub Worksheet_DD()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B16")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("B22")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With

and continues with more coding

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Make same picture appear more than once

Bernie's workbook can be found at Debra Dalgleish's site.

Alows for more than one picture to be displayed based upon a value or item
chosen from DV lists

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection

Edit the code to suit.

On Tue, 22 Jul 2008 09:20:01 -0700, TheSurreyChef <thesurreychef-microsoft @
yahoo dot co dot uk wrote:

I am having exactly the same problem. Could you email the example worksheet.

Many thanks

"Bernie Deitrick" wrote:

dd,

You need to copy and paste the picture, then name it in a way that you can later delete it (so, no,
you cannot output it more than once without changing the picture's name).

I have an example workbook that shows the technique. Email me privately and I will forward it to
you. (Reply, then take out the spaces and change dot to .)

HTH,
Bernie
MS Excel MVP


"dd" wrote in message
...
Hi I have the macro working for inserting different pictures but what if I
want to see the same picture output more than once without changing the
picture name.
In another worksheet, I have the a list with the name and picure number.
When the name matches the corresponding picture, it will show but for
example, if there were three of the same name only one picture will show and
the other two will be blank.

Below is the code I'm using.

Private Sub Worksheet_DD()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B16")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("B22")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With

and continues with more coding

Thanks





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
make a picture a chart Bucs fan Charts and Charting in Excel 2 October 20th 07 11:34 AM
How do I take a picture and make it a graph in Excel? DavidBr318 Charts and Charting in Excel 1 April 6th 06 05:45 AM
Can I make my Hyperlink a picture? Rachel Excel Discussion (Misc queries) 1 January 17th 06 06:23 PM
how to make a picture pop-up when selecting a cell? tendercare New Users to Excel 1 September 6th 05 12:47 PM
How can I make a picture of my Excel sheet? Hebel Excel Worksheet Functions 3 December 5th 04 09:40 PM


All times are GMT +1. The time now is 08:02 AM.

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

About Us

"It's about Microsoft Excel"