ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I get a visio pic on my worksheet on a form? (https://www.excelbanter.com/excel-programming/381575-re-how-do-i-get-visio-pic-my-worksheet-form.html)

Tom Ogilvy

how do I get a visio pic on my worksheet on a form?
 
Private Sub Worksheet_Calculate()
Dim oPic As Picture
End Sub

worked fine for me in Excel 2003

Picture is a valid object.

--
regards,
Tom Ogilvy

"Jason V" wrote in message
...
Thanks. I think I am close. My only problem now is that the code written
in
the example is this
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("F1")
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
End Sub

my excel 2003 does not like the Dim opic as Picture
Do you have an answer for this?
Thanks
--
Jason V


"Tom Ogilvy" wrote:

If it is a picture and not an Oleobject

Display Pictures:
http://www.mcgimpsey.com/excel/lookuppics.html

If an OleObject, then I think you have to copy and paste as Object

--
Regards,
Tom Ogilvy


"Jason V" wrote:

I have visio pics on a worksheet and depending on an answer I want to
use
change the picture in my image. How do I do this in VBA Code.
--
Jason V





All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com