Change Error Alert Icon in Data Validation

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?
 
J

Jim Cone

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?
 
B

briansaito

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?
 
J

Jim Cone

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top