Ctrl+W closes Chrome entirely instead of just a single tab
-
Created a vbs to close a tab in Chrome using Ctrl+W.
Dim Wsh
Set Wsh = Wscript.CreateObject("Wscript.Shell")
Wsh.SendKeys "^{W}"When I run it, it closes the entire Chrome window instead of just the single tab and I have no idea why.
-
@Russ any ideas on how to direct the command at the Chrome window?
-
@kellanist, I don't know why CTRL+W closes Chrome, but I did find that CTRL+F4 works to close a single tab:
Dim Wsh Set Wsh = Wscript.CreateObject("Wscript.Shell") Wsh.SendKeys "^{F4}"
-
@Russ That worked brilliantly!!!! It also solved another issue I had been having. When programming a button on my Logitech keyboard, Ctrl+W wouldn't "select" the Chrome window again after it closed the tab. Ctrl+F4 worked much better than Ctrl+W.
THANK YOU!!! Now I feel like I'm on the Enterprise. I can just yell at the computer to do everything.
-
@kellanist, sweet! I'm glad that worked out.