I am a beginner Macro coder and was hoping someone can help me with this problem.
I have a macro that activates a specific Internet Explorer window (that's already open) and then uses SendKeys to type a URL in the address bar.
The problem is, i would like to assign a shortcut to the macro. But when I run the macro using the shortcut key, it's as if the Ctrl key is still pressed (so if, for example, I have SendKeys "p" - it opens up the Explorer print function, instead of just typing the letter p). If i run the macro using Tools,Macro... it works fine. Any suggestions?
This is the macro:
ssnText = Application.WorksheetFunction.Text(ActiveCell.Value, "000000000")
AppActivate Title:="yyyy"
Application.Wait Now() + TimeValue("00:00:01") ' Wait a sec (i got this from mrexcel)
SendKeys "%d" & "https://www.yyyy.com/searchssn.asp?SSN=" & ssnText & "{ENTER}"
I have a macro that activates a specific Internet Explorer window (that's already open) and then uses SendKeys to type a URL in the address bar.
The problem is, i would like to assign a shortcut to the macro. But when I run the macro using the shortcut key, it's as if the Ctrl key is still pressed (so if, for example, I have SendKeys "p" - it opens up the Explorer print function, instead of just typing the letter p). If i run the macro using Tools,Macro... it works fine. Any suggestions?
This is the macro:
ssnText = Application.WorksheetFunction.Text(ActiveCell.Value, "000000000")
AppActivate Title:="yyyy"
Application.Wait Now() + TimeValue("00:00:01") ' Wait a sec (i got this from mrexcel)
SendKeys "%d" & "https://www.yyyy.com/searchssn.asp?SSN=" & ssnText & "{ENTER}"