excelvbabrowsertabssendkeys

How to press Ctrl plus w keys three times via SendKeys method in VBA?


The following code press the TAB key three times. The following code is okey.

SendKeys "{TAB 3}", True

How to press Ctrl plus w keys three times?

I have tried the following code but it doesnt work.

SendKeys "^w 3", True

Please note that Ctrl plus w keys is using to close Active Web Page.

So I want to close last three web pages.


Solution

  • Pls. try this

    SendKeys "^{w 3}", True