Sync function doesn't work in DP so instead of Sync use Wait(). Or use below code
Code:
Set IE = CreateObject("InternetExplorer.Application")
while IE.busy
wend