I made a public function which checks the running programs in Windows to see if we're in design-time or run-time environment. If you want to disable certain checks in design-time then just call the function to see if it returns true.
Public Function TestEnv() As Boolean
Dim buffer As String
Dim EnvFileName As String
Dim Envs As Variant
Dim nRet As Long
Dim i As Long
For i = LBound(Envs) To UBound(Envs)
buffer = Envs(i)
nRet = GetModuleHandle(buffer)
If nRet <> 0 Then
EnvFileName = buffer
TestEnv = True
Exit For
End If
Next
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.