Hi All,
I have searched and got this code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim RetVal As Variant
If Target.Cells.Count = 1 Then
If Not Intersect(Target, Range("B2:B999")) Is Nothing Or Not Intersect(Target, Range("C2:C999")) Is Nothing Then
If Not IsEmpty(Target) Then
RetVal = Shell("cmdkey /generic:""" & Target & """ /user:""" & Target.Offset(0, 1) & """ /pass:""" & Target.Offset(0, 2) & """", 1)
RetVal = Shell("c:\Windows\System32\mstsc.exe /admin /v:" & Target, 1)
End If
End If
End If
End Sub
This works perfectly for Windows 8 and up but I couldn't seem to make it work with windows xp.
Any ideas?
Many thanks in advance!
Bookmarks