Dim a As Object
Set a = CreateObject("WScript.shell")
a.SendKeys "a" '直接输出字母"a"
a.SendKeys "^v" 'CTRL键加v键
a.SendKeys "%{F4}" 'ALT键加F4键
a.SendKeys "+{tab}" 'SHIFT键加tab键
a.SendKeys "你好吗?" '直接输出字符串:"你好吗?"
a.SendKeys Chr(vbKeyA) '用键盘ascii码输入
a.SendKeys "{F5}" '按F5
'(注意:功能键必须加{})