Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Sendkeys issue

I have some code I'm running to change printer properties. I've
successfully been able to change the needed properties, but only works
for the currently selected sheet. I tried running a loop such as:

For each sh in Worksheets
sh.Activate
Application.SendKeys {"%fu")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Sendkeys issue

You can try adding a DoEvents line immediately after the sendkeys line. This
might help. I have not tested it but that is what I would try first.

"Michael Malinsky" wrote:

I have some code I'm running to change printer properties. I've
successfully been able to change the needed properties, but only works
for the currently selected sheet. I tried running a loop such as:

For each sh in Worksheets
sh.Activate
Application.SendKeys {"%fu")
.
.
.
Next sh

but it first loops through activating each sheet before executing any
of the SendKeys statements.

From what I've read in the NGs, SendKeys can be messy, but I don't seem

have another option. Any ideas?

Thanks,
Mike.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Sendkeys issue

I actually had to sandwich the sendkeys stuff between two DoEvents, but
it works. Thanks!

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
SendKeys? CMK Excel Programming 2 February 23rd 05 12:03 AM
SendKeys Mike Excel Programming 2 July 2nd 04 12:47 AM
Sendkeys GB[_3_] Excel Programming 0 September 16th 03 10:39 PM
SendKeys Ron de Bruin Excel Programming 3 August 25th 03 10:21 PM
sendkeys mark poole Excel Programming 0 July 11th 03 03:47 PM


All times are GMT +1. The time now is 03:04 AM.

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"