0

I am currently working on a userform where i have disabled X (close button) on the forms and have added two buttons one of which will run a sendkey function to do ALt+Tab. For the other one I want to assign Win+D

The Win + D not seems to be working, it just activates Windows but not capturing the D. Following is the code:

Application.SendKeys ("^{ESC}D")

I am not sure if this is even possible. I tried the internet search over and over but wasn't fruitful.

BigBen
  • 46,229
  • 7
  • 24
  • 40
Nagarjuna
  • 11
  • 3

1 Answers1

0

Instead of trying to use Excel Application.SendKeys you could use Shell.Application

Excel Macro

Sub ShowDesktop()

    CreateObject("Shell.Application").MinimizeAll

End Sub
Dharman
  • 30,962
  • 25
  • 85
  • 135
usar93
  • 1