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,
0
Jeff1 (635)
2/11/2005 2:41:04 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
361 Views

Similar Articles

[PageSpeed] 46

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
0
ec357201 (5290)
2/12/2005 2:38:10 AM
Reply:

Similar Artilces:

Excel Form "Component Not Registered"
I am using several excel spreadsheet that are working on many other machines but they all of a sudden started giving me a "component not registered" error. I don't know of any changes to my workstation environment. In order to debug, I stripped down the excel spreadsheet to the bare minimum. I noticed that when all the forms were removed from the spreadsheet that the problem disapeared. I removed everything in the spreadsheet except for one form and a Workbook_Open() procedure. No problem occurs if I have an empty procedure but as soon as I even put a comment in th...

link excel with access
Is it possible to link Excel with access such that any changes made in Excel will also occur in the access database? In other words, I need to maintain a 2-way linkage between the 2, but I want all my data to reside in the database, not the spreadsheet. I understand that creating a Linked table in Access would accomplish the linkage I want, but it creates problems when I link that table with a Visio drawing...which is why the data needs to stay in the Access DB. Anyone have any suggestions? I know that vba will accomplish this, but I am not an expert in that field. Any help would be appre...

Dual Displays
I want to connect my Sharp Aquos flat screen TV to my computer, and see my desktop on both the TV and computer monitor. Windows Vista Home Premium. HP Pavilion a1610n computer. Galaxy GeForce 8400 GS graphics card, outputs: 1-VGA, 1-DVI, and 1-SVGA. There is no HDMI port on the card. I connected a VGA cable between the motherboard "on-board" VGA port and the TV, figuring that I could use that output to work with the TV. The computer monitor is plugged into the GeForce graphics card. Tried the Desktop "Display Setting". It says, the number 2 monitor is "N...

Folder could not be displayed
I am running Windows XP and Outlook Express 6 just fine then one day my husband does something to my computer and his email account won't work. My email is working just fine but in his he cannot open his inbox. It says folder could not be displayed, and when you send and receive it gives you this error message: "An unknown error has occured. Account: 'incoming.verizon.net'. Server:'incoming.verizon.net'.Protocol:POP3, port: 110, Secure(SSL): No, error number: 0x800C013B" If anyone could help me with this I would greatly appreciate it. Thank you T...

Display a message box "this entry is a duplicate"
How can I display a message box on a form if the shipment number is a duplicate? I need a message box to pop up when user attempts to tab out of the field. Thank you. Something like: Private Sub txtShipNum_BeforeUpdate(Cancel As Integer) If DCount("*", "MyTable", "ShipNum = '" & Me.txtShipNum & "'") > 0 Then Msgbox Me.txtShipNum & " already exists." Cancel = True End If End Sub This assumes that your text box is named txtShipNum, that the name of the field in table MyTable is ShipNum...

Excel Formulas #11
I would like to create a sumation formula that will pull in different values depending upon what I need. For example, I want to add values in column A, however sometimes I want to go through row 10 and the next time through row 20. So I want to create a formula that will give the value depending on the the row number I type in. For example if I type in 15 then I will get a sum of variables in column A of rows 1 through 15. If I type in 20 then I will get a sum of variables in rows 1 through 20. How do I create such a formula? Any help would be much appreciated. -- ag_banker_kansas You ca...

open excel file
i have problem with a excel file. the file is not to big. its has 5 tabs only. and when i click on to one of the "tabs" the excel gives me a error message as "not reponding". and this happens with this particular tab only. any help "Rohit" wrote: > i have problem with a excel file. the file is not to big. its has 5 tabs > only. and when i click on to one of the "tabs" the excel gives me a error > message as "not reponding". and this happens with this particular tab only. > > any help Try looking at thi...

Upside Down & Mirror Images of Pictures
Our company has an Excel Spreadsheet expense report master with our company logo inserted in a set of merged cells. When viewed/used in Excel 2002, the logo is upside down and a mirror image of what is shown in Excel 2000. I checked and some other 2000 spreadsheets with this logo appear OK when viewed in 2002. I guess the Master report on our LAN could be edited with 2002 to fix this problem. But my concern is if this does happens on other documents created in Excel 2000 or before, it could be rather embarrassing if those documents are sent to a client. Anyone seen this before? Any...

Excel Slooooow. It takes 4 to 6 seconds to perform each input or command
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have just installed Excel 2008 on a new installation of Snow Leopard and it does not work properly. It takes ages to register every input or command, like a large Lag. <br><br>EG. each figure or text, input into cells takes 4 seconds from hitting enter to accepting the input. Changing the width of a column takes 6 seconds from letting go of the mouse after dragging to the new width. etc etc. <br><br>I have checked for updates. Any ideas? > I have just installed Excel 2008 on a n...

how to display values in 3 cells into one cell
Anyone can help me how do I display the 3 separate different values in 3 cells into just one single cell ? thanks so much in advance. Either there was a typo or there's an echo in here. That line should have been: = A1 & " " & B1 & " " & C1 "Bradley Dawson" <bradleydawson@earthlink.net> wrote in message news:l464b.2224$Lk5.2093@newsread3.news.pas.earthlink.net... > In the target cell, type: > > = A1 & B1 & C1 > > where A1, B1, C1 are the cell addresses that you want to concatenate. > > If these have number...

How to select & display distinct values
Hello, I need help with a form please. My form has two controls, the first being a combo box. This box should select the company name from a lookup table. The lookup table has only two companies in it, however, they each are repeated several time. Company 1 has about 10 rows, company 2 has 3 rows. I used the query builder and came up with the statement: "SELECT DISTINCT Lktbl_Role_Master.CompanyName FROM Lktbl_Role_Master;" When I run the statement directly from query view, it executes perfectly and returns exactly two rows (one for each company, in a datasheet view) ho...

Display Time in Outlook
The time setting in my Outlook is one hour behind my actual time. I cannot determine how to change the time. Outlook is the only item that is incorrect. Other display times in operating system are correct. Thanks, Jodi ...

In nameing a sheet in Excel it puts a .xls] in front why?
Every time I go to name a sheet it puts an .xls] in front of it and I do not know why Did you try to put brackets around the name? -- Don Guillett SalesAid Software donaldb@281.com "EZE" <EZE@discussions.microsoft.com> wrote in message news:C9045E70-AD04-4C91-B223-8851A0DFE55D@microsoft.com... > Every time I go to name a sheet it puts an .xls] in front of it and I do not > know why Remove the bracket or other illegal character(s) from the workbook name. In article <C9045E70-AD04-4C91-B223-8851A0DFE55D@microsoft.com>, EZE <EZE@discussions.microsoft.com>...

Word Cells into Excel Cells #2
How does one import a cell formatted Word file *.doc into cells within Excel *.xls. By "cell formatted Word file", do you mean a table? I would simply select table and click copy. Then open excel and paste it where you want it to appear. J "gary" wrote: > How does one import a cell formatted Word file *.doc into > cells within Excel *.xls. > > > jayceejay Wrote: > By "cell formatted Word file", do you mean a table? I would simpl > select > table and click copy. Then open excel and paste it where you want i > to > ap...

Activate my Excel 2003 but it still runs in reduce mode
My Excel 2003 is showing that it's activated but it is still running in reduce mode. what I'am doing wrong? Rightclick on the excel icon on the windows taskbar (usually at the bottom of the screen). Choose Maximize. Maybe it's just off the screen (not really minimized--just off the screen). atomicesar wrote: > > My Excel 2003 is showing that it's activated but it is still running in > reduce mode. what I'am doing wrong? -- Dave Peterson ...

PK and FK Displayed
I am a complete Visio newbie, and cannot find the answer I need in books or online help. I am trying to create ER diagrams from scratch, and not connected to real tables, using VEA. I have added tables ('Entities') to the form, connected them with a Relationship connector, and, in the Database Properties window I've assigned the end points to a Primary Key on the left and a Foreign Key on the right. But the model shows the connector as running between the top colums on both sides, whereas I want the keys to be in that upper box and provide the connector's end points. Wh...

Upsizing with picture data
I am attempting to upsize a database from Access 2003 to SQL Server 2005 Express. All tables, indexes, relations, etc. are correctly upsized, except one table refuses to cooperate. This table is an OLE object field, which contains picture data. If I remove this field, the table can be upsized. Apparently, the upsizing wizard is unable to make the transition. Is there a way around this dilema? create the table with out the old field then create a append query and add the field use the image data type. now you can append the missing data Hope this helps "wschlichtman" <wsc...

excel question borderline programing
here is what i am trying to do. lets say i want cell a1 to reflect upon cell b1. b1 can represnt 1 of 2 things what ever it may be. if b1 contains lets say x or (2pm-6pm) to make cell a1 represent an (*). but if b1 then has y or somthing like (req off) make a1 either be 0 or better yet be blank. is this possible? email me dkuhl75@yahoo.com. thank you duane Hi Duane, Put =IF(B1="x","*","") in cell A1 if you want it to return blank or =IF(B1="x","*",0) if you want it to return 0 HTH Martin ...

Excel error message not understood
Has anyone ever gotten the error message "Too many different formats"? If so, what exactly does it mean and what can a user do about it? The following MSKB article has information on the error message: XL: Error Message: Too Many Different Cell Formats http://support.microsoft.com/default.aspx?id=213904 Jimbo wrote: > Has anyone ever gotten the error message "Too many > different formats"? If so, what exactly does it mean and > what can a user do about it? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Formulas are displayed, results are not
Hello, For some reason, when I enter a formula into a cell and press enter, the formula just stays there. Anyone know what I can do to show the results? I tried pressing Cntrl + `, but that didn't work. FYI, when I cut and paste a column from a separate workbook, that column works like normal (i.e., the formulas produce results). Thanks for any suggestions! Hi Mike, Maybe your cell is preformatted as Text. Try formatting to general then erase your = and type it in again. HTH Martin "Mike C" <js2k111@yahoo.com> wrote in message news:f699bcd4-ad82-4a88-9759-5638c147b...

reading data from Excel Sheet
hi, i want to read the data from the Excel sheet using vc++6.0. How can i read it. i don't want to create any DSN thank you, regards, koti You can use the Excel.Application com object -- Satish "Koti" wrote: > hi, > > i want to read the data from the Excel sheet using vc++6.0. How can i > read it. i don't want to create any DSN > > thank you, > > regards, > koti > > > ...

How do I pinwheel pictures?
I want to put 4 pictures in a circle with one picture under another, kind of in an over, under pattern. I can get three done but the last photo is always either over two pictures or under. Is there a way to set a pattern for 4 pictures? Copy your final photo, paste, align the two photos, horizontal and vertically. Crop the top photo to the center. This half you will make it appear correct. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Ilex52" <Ilex52@discussions.microsoft.com> wrote in message news:FB986C3B...

Stop displaying a line
I have a line graph/chart and it gets its values using a formula and the values of another column. However this poses a problem because if there is nothing in the targetted column the formula returns 0 cause the line to drop to the bottom, instead of casuing the line to just end until a value is added to the target column. How can I do this? Change your formula to use NA() if the cell is empty. For example: =IF(A1="",NA(),A1) To hide the resulting #N/A errors on the worksheet, you can use conditional formatting. There are instructions here: http://www.contextures.com/xlC...

Watermark for Excel chart
Does anyone know how to create a watermark on an Excel Chart? Tom, You might try a few of things: (1) Activate your chart by clicking on it. Type the word "Draft" and hit the enter key. A textbox should appear with the word "Draft" on the chart. Position the textbox to where you want it to be and format it accordingly. (2) Double - click on the outside area of your chart. In the Format Chart Area dialog box, set the Area to None. Do the same with the plot area. Now, select a range on your spreadsheet that contains the text of the watermark that you want. In...

Saving excel to network folder
The file "filename.xls" may have been changed by another user since you last saved it. In that case, what do you want to do save a copy or overwrite changes This is the error message we are receiving in Excel 2002 only. We are saving the file on our network shared folder (network is NT4 server) we also have MAC volume services on this folder because it is also seen on the MAC. Any suggestions. We are not changing the file by another user we can change the file 1 minute after first saving it and it still pops up with the message HELP! ...