ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Error Alert Icon in Data Validation (https://www.excelbanter.com/excel-programming/389274-change-error-alert-icon-data-validation.html)

[email protected]

Change Error Alert Icon in Data Validation
 
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?


Jim Cone

Change Error Alert Icon in Data Validation
 

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



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?


[email protected]

Change Error Alert Icon in Data Validation
 
On May 12, 9:16 am, "Jim Cone" wrote:
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


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?


Jim Cone

Change Error Alert Icon in Data Validation
 

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


wrote in message
Sure. Can I add to or replace those three default icons?



All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com