Use project script execution module type

The property Project.ScriptExecutionModuleType contains the information whether a rich client or thin client module is running the script. You can use this property together with the property Project.ScriptExecutionMode to distinguish for example, if rich client Validation or Thin Client Validation is running the script and define different programming steps dependent on the executing module.

... 
If Project.ScriptExecutionMode=CscScriptExecutionMode.CscScriptModeValidation Then
 If Project.ScriptExecutionModuleType=CscScriptModuleTypeRichClient Then
   ' this part is only executed during rich client Validation module 
   ThinClientVal=False
 Else
   ' this part is only executed during Thin Client Validation processing 
   ThinClientVal=True
 End If
End If
...