Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

.gif in a cell?

Posted by Bill on September 04, 1999 12:26 AM
Can I configure a cell (column) so that any entry results in a gif? like a checkmark.
Thank you.

Check out our Excel VBA Resources

Re: .gif in a cell?

Posted by Ivan Moala on September 04, 1999 4:35 AM


Bill you could try adding the following routine.
Note: it assumes;
1) Your entry is in Column 1 ("A")
2) The check mark is the wingdings check mark
and is placed in column 2 ("B")
It works on the workbooks sheet change event so that
If the cells in column "A" have an entry then
it places the checkmark in column "B".
If you delete it it removes the checkmark.
It also handles multiple deletions of text in
column "A" to delete the checkmark.

Also note that it works on ALL worksheets to
only work on a specific sheet you can add it in
that particular worksheets event for the change.
Or do a check for the Sheet you want it to work in.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
If Target.Column = 1 Then
If Target.Text <> "" Then
'Handle multiple ranges
For Each c In Target
c.Offset(0, 1).FormulaR1C1 = "þ" 'wingdings check mark
c.Offset(0, 1).Font.Name = "Wingdings"
Next
'Handle event for delete
Else
For Each c In Target
c.Offset(0, 1) = "" 'Blankout any wingdings check mark
c.Offset(0, 1).Font.Name = "Arial" 'change default font
Next
End If
End If
End Sub


Re: .gif in a cell?

Posted by Bill on September 06, 1999 8:55 AM



This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.