Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Error - SendKeys in between a macro

Dileep wrote:
... SendKeys ..

To debug SendKeys, I've done the following:
replace
Sendkeys "ABC", True (Don't you want True?)
SendKeys "DEF", True
with
Call zSendKeys("ABC")
Call zSendKeys("DEF")

Sub zSendKeys(ps$)
Dim t!
Beep
t = Timer + 5 ' 5 seconds to switch to application
While Timer < t: DoEvents: Wend
SendKeys ps, True
t = Timer + 5 ' 5 seconds to look at action
While Timer < t: DoEvents: Wend
stop ' maybe
End Sub

You have to realize that switching windows may
reset the field selected. D-C


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Error - SendKeys in between a macro Dileep Chandran Excel Programming 0 September 19th 07 10:49 AM
macro doesn't properly record AutoSum (and SendKeys doesn't work) crimsonkng Excel Programming 2 November 21st 06 02:11 PM
What's the syntax error with this SendKeys code? Phil1982 Excel Programming 1 March 19th 06 06:52 PM
Slow down SendKeys macro [email protected] Excel Programming 1 August 29th 05 10:20 AM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"