Hello,
The code below takes about 1 minute to find the folder on the smartphone. If I start the process again, the page comes up immediately. If I disconnect the smartphone from the computer and reconnect it again, it takes about 1 minute again for the folder to be found on the smartphone. Why is that? The code was not created by me. I know a bit about VBA, but I'm not an expert at it. Maybe someone knows how to improve it.
Thanks for the help. Greeting Harry
>>> use code - tags <<<
The code below takes about 1 minute to find the folder on the smartphone. If I start the process again, the page comes up immediately. If I disconnect the smartphone from the computer and reconnect it again, it takes about 1 minute again for the folder to be found on the smartphone. Why is that? The code was not created by me. I know a bit about VBA, but I'm not an expert at it. Maybe someone knows how to improve it.
Thanks for the help. Greeting Harry
>>> use code - tags <<<
Code:
Function GetPhoneCLSID(name As String)
Set objShellApp = CreateObject("Shell.Application")
Set objFolder = objShellApp.Namespace("shell:MyComputerFolder")
For Each objItem In objFolder.Items()
If InStr(1, objItem.name, name, vbTextCompare) > 0 Then
GetPhoneCLSID = objItem.Path
End If
Next
End Function
Sub a()
Shell "explorer " & GetPhoneCLSID("Galaxy") & "\Phone", vbNormalFocus 'CopyGalaxy
End Sub
Last edited by a moderator: