Dear all,
I'm getting the below on error on this code:
Sub GetPidVersionTwo()
Dim objSWbemServices As Object
Dim colSWbemObjectSet As Object
Dim objSWbemObject As Object
Dim StrComputer As String
Dim RstProcess As ADODB.Recordset
Dim CommandLineToSearch As String
Dim StrExecQuery As String
StrComputer = "."
StrExecQuery = "SELECT ProcessID, Name, CommandLine FROM Win32_Process WHERE Name = 'MSACCESS.EXE' and CommandLine Like '%D:\Database\Sample.accdb%'"

I'm sure the issue is on the path D:\Database\Sample.accdb; any way to fix it?
Thanks