View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
Posts: 340
Default Excel 2003, Vista, and Sendkeys

Greetings. I just reformatted one of my PCs, installed Windows Vista and
then Excel 2003 so that I had a clean installation. I found that Sendkeys
does not work on Excel 2003 on Windows Vista. I recognize that Sendkeys
should only be used when all else fails, but there are those situations.

The solution is to do the following: (in this case for File, Open)

Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
wshShell.SendKeys "%FO", True

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel