On 2002-03-08 22:45, Derek wrote:
Hi
Not quite sure what you are trying to do.
If your map is a picture you could insert it into a cell comment so that it displayed when the cell was selected.
Derek thats a good idea....
If the idea is OK with Peter then he could
use this code to insert the pictures.
Sub Pict_Comments()
Dim HasCom
Dim Pict As String
Dim ImgFileFormat As String
Dim Ans
Set HasCom = ActiveCell.Comment
If Not HasCom Is Nothing Then ActiveCell.Comment.Delete
Set HasCom = Nothing
ImgFileFormat = _
"Image Files (*.bmp;*.gif;*.tif;*.jpg),*bmp;*gif;*.tif;*.jpg"
GetPict:
Pict = Application.GetOpenFilename(ImgFileFormat)
'Note you can load in any nearly file format
If Pict = "False" Then End
Ans = MsgBox("Open : " & Pict, vbYesNo, "Use this Picture")
If Ans = vbNo Then GoTo GetPict
With ActiveCell
.AddComment
.Comment.Visible = False
.Comment.Shape.Fill.Transparency = 0#
.Comment.Shape.Fill.UserPicture Pict
End With
End Sub
HTH
Ivan
This message was edited by Ivan F Moala on 2002-03-09 01:26