jerry12302
Active Member
- Joined
- Apr 18, 2005
- Messages
- 456
- Office Version
- 2010
- Platform
- Windows
I have code to copy a website Login ID, then open Chrome and navigate to a website where I can paste my Login ID to log in. After returning to Excel it still has the Login ID range in copy mode and I have to press Escape. If I add Application.CutCopyMode = False after the code that navigates to the website, I lose the Login ID copy.
How can I have Excel pause macro execution until after I return to Excel?
Here is the code I use (modified to be a sample):
Sub ABC_Website_Login()
Dim chromePath As String
Range("LoginID").Copy
chromePath = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""
Shell (chromePath & " -url https://www.somewebsiteIuse.com/login")
'Need some code here to suspend the macro until I return
Application.CutCopyMode = False
End Sub
How can I have Excel pause macro execution until after I return to Excel?
Here is the code I use (modified to be a sample):
Sub ABC_Website_Login()
Dim chromePath As String
Range("LoginID").Copy
chromePath = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""
Shell (chromePath & " -url https://www.somewebsiteIuse.com/login")
'Need some code here to suspend the macro until I return
Application.CutCopyMode = False
End Sub