Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jeff
 
Posts: n/a
Default display a picture in excel as an icon

Hello,

I want to put a picture in a Excel cell and have it represented as an icon
until someone clicks on it.

What we have is an inventory list with pictures.

Nothing I've tried seems to work very well.

Thanks,
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe you could put both the thumbnail and larger picture on the worksheet.

Then assign them the same macro. If you use nice names, it might even work!

I named my pictures:

Pic01_B, Pic01_S
(big and Small)
through
pic99_B, Pic99_S

Option Explicit
Sub testme()

Dim myPict As Picture
Dim OtherChar As String
Set myPict = ActiveSheet.Pictures(Application.Caller)

If LCase(Right(myPict.Name, 1)) = "s" Then
OtherChar = "b"
Else
OtherChar = "s"
End If

myPict.Visible = False
ActiveSheet.Pictures(Left(myPict.Name, Len(myPict.Name) - 1) _
& OtherChar).Visible = True

End Sub

This doesn't have any validation. You could either add it or be really careful
naming those pictures <vbg.



Jeff wrote:

Hello,

I want to put a picture in a Excel cell and have it represented as an icon
until someone clicks on it.

What we have is an inventory list with pictures.

Nothing I've tried seems to work very well.

Thanks,


--

Dave Peterson
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 12:46 PM
How can I print an excel chart so a picture is not distorted? MJADAMS Charts and Charting in Excel 0 February 9th 05 04:03 PM
Excel range truncates when Pasted as Picture to PPT & Word Floyd Excel Discussion (Misc queries) 2 January 28th 05 05:21 AM
Excel crashes when opening excel document by double-clicking icon yasminejade Excel Discussion (Misc queries) 3 January 14th 05 10:40 AM
Need excel formula to display 28.50hrs in HRS & MINS? rbc Excel Worksheet Functions 4 January 6th 05 01:21 PM


All times are GMT +1. The time now is 04:30 AM.

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"