Link to home
Start Free TrialLog in
Avatar of hindersaliva
hindersalivaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel VBA - getting rid of the green triangle

I have the dreaded green triangles when entering Date values into cells (with VBA). I want to lose them. I found this

Application.ErrorCheckingOptions.BackgroundChecking = False

However this turns off the error checking globally and I don't want to leave the users with this condition. Is there a way of fixing this in code? I tried formatting the cells to Text prior to entering the values but that didn't work.
Thanks!
SOLUTION
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, how are you entering the date values in the cell?

Sid
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hindersaliva

ASKER

Thanks everyone.
Answer to Sid' question - by code such as
Range("D4").Value = myDateVariable

I'll split the points between Zorvek and Teylyn.
Zorvek's detailed explanation is very helpful.