Change Error Alert Icon in Data Validation

  • Thread starter Thread starter briansaito
  • Start date Start date
B

briansaito

Is there a way I can add a custom icon to display when the error alert
pops up in a data validated box? Is there code I'd have to write, or
does Excel reference a folder for those icons and I could add my image
to that folder?
 
I am not aware of any way using VBA to add a custom icon.
There are three built in icons available when using the AlertStyle
property of the Validation object.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


<[email protected]>
wrote in message
Is there a way I can add a custom icon to display when the error alert
pops up in a data validated box? Is there code I'd have to write, or
does Excel reference a folder for those icons and I could add my image
to that folder?
 
I am not aware of any way using VBA to add a custom icon.
There are three built in icons available when using the AlertStyle
property of the Validation object.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware

<[email protected]>
wrote in message
Is there a way I can add a custom icon to display when the error alert
pops up in a data validated box? Is there code I'd have to write, or
does Excel reference a folder for those icons and I could add my image
to that folder?

Sure. Can I add to or replace those three default icons?
 
See my original post.
However, you could create your own validation code in the
Worksheet_Change event. Then if the entry in the cell is not
valid, display a userform with your custom image and message.

Something possibly similar to this...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Me.Range("B5").Value < 5 Then
CustomUserForm.Show
Unload CustomUserForm
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


Sure. Can I add to or replace those three default icons?
 
Back
Top