troubleshooting Question

&H and constants

Avatar of developingprogrammer
developingprogrammer asked on
Microsoft Access
6 Comments3 Solutions515 ViewsLast Modified:
hey guys i want to use a constant t orepresent my hex value. essentially i want to do something like the below.

how do i do it in the proper way? using constants to represent hex? thanks guys!!

Public Const chexDisabledBackColour     As String = "D3D3D3"
Public Const chexEnabledBackColour      As String = "FFFFFF"

Me.txtReason.BackColor = &HmodGenericResources.chexDisabledBackColour

is this the only way? how do yall usually do it when you wanna use constants and hexadecimals?

     Function HexToLong(ByVal sHex As String) As Long
        HexToLong = Val("&H" & sHex & "&")
      End Function
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros