Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2015, 02:24 AM
IGORR IGORR is offline Mouseover image Windows XP Mouseover image Office 2007
Novice
Mouseover image
 
Join Date: Apr 2015
Posts: 2
IGORR is on a distinguished road
Default Mouseover image

Hi:

I am searching one solution for a mouseover.

If I put the mouse in A1 open the image of the path that it is in B1, the same for A2 and B2,.....I need a solution with ranges.

When I move the mouse from the cell, the image close automatically.

I don“t want to use the pictures in the comments.

Could you help me?

Thanks in advance
Reply With Quote
  #2  
Old 04-25-2015, 03:59 AM
Catalin.B Catalin.B is offline Mouseover image Windows Vista Mouseover image Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

There are many ways. One of them is to insert the image in a comment:

Right-click cell > Insert Comment > right-click comment box > Format Comment > Colors and Lines > Fill > Color > Fill Effects > Picture > select your image > Click OK
The comment box with your image will appear on mouseover.
Cheers,
Reply With Quote
  #3  
Old 04-25-2015, 04:56 AM
IGORR IGORR is offline Mouseover image Windows XP Mouseover image Office 2007
Novice
Mouseover image
 
Join Date: Apr 2015
Posts: 2
IGORR is on a distinguished road
Default

Thank for the answer, but I prefer other solution without inserting the picture in a comment box.

I have automatice the insertion of the path in the column, and I prefer to use VB.

What are other solutions?
Reply With Quote
  #4  
Old 05-02-2015, 01:03 AM
Catalin.B Catalin.B is offline Mouseover image Windows Vista Mouseover image Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Hi Igorr,
Is there a reason behind this prefference?
You can use a code to load images in comments, and after this is done, you will not depend on macros to view the images, it will work even without macros enabled...

You can try the file attached for another possibility.
I used the LoadImagePath procedure to insert the images from a folder named Images, located in the same folder where this workbook is saved. (the images are already inserted, no need to run the code again, only if you want to change the images)
Code:
Sub LoadImagePath()
Dim Types As String, Nm As String
Types = "JPEG Image, PNG Image" 'add more types if needed
Dim Dest As Worksheet, i As Integer, oFso As Object, Img As Object
Set Dest = Worksheets("Mouse Over")
Set oFso = CreateObject("Scripting.FileSystemObject")
i = 2
For Each Img In oFso.getfolder(ThisWorkbook.Path & "\Images").Files
    If InStr(Types, Img.Type) > 0 Then
            Dest.Cells(i, "A") = Img.Path
            Rows(i).RowHeight = 75
            Nm = Mid(Dest.Cells(i, "A").Text, InStrRev(Dest.Cells(i, "A").Text, "\") + 1, InStr(Dest.Cells(i, "A").Text, ".") - InStrRev(Dest.Cells(i, "A").Text, "\") - 1)
            DoEvents
            Application.Goto Dest.Cells(i, "B")
            Dest.Pictures.Insert(Dest.Cells(i, "A").Text).Select
            Selection.Height = 75
            Selection.Name = Nm
     '      Dest.Cells(i, "E") = Img.Type
            i = i + 1
    End If
Next
End Sub
The ShowHide function below, will react when called from the Hyperlink function used in cells from columns B and C:
Code:
Function ShowHideImage(Rw As Integer, ViewOption As Boolean)
Dim Nm As String
Dim Dest As Worksheet
Set Dest = Worksheets("Mouse Over")
Nm = Mid(Dest.Cells(Rw, "A").Text, InStrRev(Dest.Cells(Rw, "A").Text, "\") + 1, InStr(Dest.Cells(Rw, "A").Text, ".") - InStrRev(Dest.Cells(Rw, "A").Text, "\") - 1)

If ViewOption Then
    Dest.Shapes(Nm).Height = 75
Else
    Dest.Shapes(Nm).Height = 0
End If

End Function
Attached Files
File Type: xlsm Show images on mouseOver.xlsm (20.7 KB, 14 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouseover image Setting up signature image and image is received blurry Beesoy06 Outlook 2 03-23-2015 09:01 PM
Losing image resolution when inserting image into MS word (2011: Mac) Mario.N Drawing and Graphics 0 11-23-2014 02:38 AM
Mouseover cell to indicate mouse pointer location based on Specific Row/Column values bolandk Excel 1 05-15-2014 08:22 AM
Mouseover image Highlight text when mouseover kxt Word 4 05-17-2012 04:21 PM
Mouseover Highlite designer PowerPoint 0 01-19-2011 07:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft