![]() |
The dreaded Sendkeys command
Hi,
I have a very repetitive task I have to do sometime next week that entails entering data into a form created by foxpro. Unfortunately, the designer of the form did not design the form well, and is no longer with the company, so the tab-order is incredibly out of whack and doesn't seem to make any sense. Nevertheless, I am trying to automate the data entry using Excel, but I have one problem. When I use the following procedu Sub CheckIt() AppActivate ("Microsoft Visual FoxPro") SendKeys "{TAB}", True End Sub everything works great, but when I use the following: Sub CheckIt() AppActivate ("Microsoft Visual FoxPro") SendKeys "+{TAB}", True End Sub Absolutely nothing happens. I can't seem to tab backwards, though tabbing forwards isn't a problem. Any ideas on how to get this to work better? If I can figure this little thing out, I can save myself a couple of days of work. Thanks in advance, David Morton |
The dreaded Sendkeys command
Hi
I don't have foxpro to try it, but this worked for me in excel. I selected a cell on the sheet so I could see what was happening. You may have to make sure that the foxpro app is ready where it needs to be so that shift tab moves to where you expect it. Worksheets("sheet1").Range("c5").Select SendKeys "+({tab})" You may have to play with it a bit, but you could try just SendKeys "+({tab})" HTH Ken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.789 / Virus Database: 534 - Release Date: 07/11/2004 |
All times are GMT +1. The time now is 06:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com