Refresh Windows DESKTOP via VBA

memaxt

Registered User.
Local time
Today, 13:19
Joined
Mar 12, 2013
Messages
62
Hi there,

I have vba that renames an external database, upon renaming the database it is not instantly updated unless you refresh the folder / desktop, is there vba that can refresh the windows desktop?
 
Code:
Public Sub subRefreshDesktop()

 Dim WSHShell As Object
 Set WSHShell = CreateObject("WScript.Shell")
 WSHShell.AppActivate "Program Manager"
WSHShell.SendKeys "{F5}"
Set WSHShell = Nothing

End Sub
 
Thank you arnelgp,

That worked a treat!
 

Users who are viewing this thread

Back
Top Bottom