Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old February 26th 20, 05:16 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 61
Default Programmatic alternative to SendKeys

Hi, I'm finding that SendKeys is somewhat flakey, as noted by many people.

I'm using it in Excel to start and stop an external program, symbol "RLT", but it does not always work, that is it will start but then not stop. The same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some please guide me on how to write it?

Many thanks for all help. AM

  #2   Report Post  
Old February 26th 20, 09:20 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,182
Default Programmatic alternative to SendKeys

Hi, I'm finding that SendKeys is somewhat flakey, as noted by many people.

I'm using it in Excel to start and stop an external program, symbol "RLT",
but it does not always work, that is it will start but then not stop. The
same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM


What is the full name (path\filename) of the program?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Old February 26th 20, 09:43 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 61
Default Programmatic alternative to SendKeys

On Wednesday, February 26, 2020 at 3:21:07 PM UTC-6, GS wrote:
Hi, I'm finding that SendKeys is somewhat flakey, as noted by many people.

I'm using it in Excel to start and stop an external program, symbol "RLT",
but it does not always work, that is it will start but then not stop. The
same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM


What is the full name (path\filename) of the program?

--
Garry


Hi Garry, good to hear from you!

C:\RealTick\rt332.exe

As always, many thanks for your interest.
  #4   Report Post  
Old February 27th 20, 12:22 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,182
Default Programmatic alternative to SendKeys

On Wednesday, February 26, 2020 at 3:21:07 PM UTC-6, GS wrote:
Hi, I'm finding that SendKeys is somewhat flakey, as noted by many people.

I'm using it in Excel to start and stop an external program, symbol "RLT",
but it does not always work, that is it will start but then not stop. The
same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM


What is the full name (path\filename) of the program?

--
Garry


Hi Garry, good to hear from you!

C:\RealTick\rt332.exe

As always, many thanks for your interest.


When RT332 is running, what is its window Title?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #5   Report Post  
Old February 27th 20, 05:32 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 61
Default Programmatic alternative to SendKeys

On Thursday, February 27, 2020 at 6:22:38 AM UTC-6, GS wrote:
On Wednesday, February 26, 2020 at 3:21:07 PM UTC-6, GS wrote:
Hi, I'm finding that SendKeys is somewhat flakey, as noted by many people.

I'm using it in Excel to start and stop an external program, symbol "RLT",
but it does not always work, that is it will start but then not stop. The
same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM

What is the full name (path\filename) of the program?

--
Garry


Hi Garry, good to hear from you!

C:\RealTick\rt332.exe

As always, many thanks for your interest.


When RT332 is running, what is its window Title?

--
Garry


It doesn't have a window of its own. It operates in the background by sending data into Excel. The ribbon has a button named "Realtick ©". Clicking on it produces a drop-down box whose leftmost button is named either "start" or "pause", either starting the data feed or interrupting it. This is the action I'm trying to automate with a macro. It's easy using Sendkeys but, as mentioned, this doesn't always work.

Thanks, Garry


  #6   Report Post  
Old February 27th 20, 05:54 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,182
Default Programmatic alternative to SendKeys

On Thursday, February 27, 2020 at 6:22:38 AM UTC-6, GS wrote:
On Wednesday, February 26, 2020 at 3:21:07 PM UTC-6, GS wrote:
Hi, I'm finding that SendKeys is somewhat flakey, as noted by many
people.

I'm using it in Excel to start and stop an external program, symbol
"RLT", but it does not always work, that is it will start but then not
stop. The same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM

What is the full name (path\filename) of the program?

--
Garry


Hi Garry, good to hear from you!

C:\RealTick\rt332.exe

As always, many thanks for your interest.


When RT332 is running, what is its window Title?

--
Garry


It doesn't have a window of its own. It operates in the background by
sending data into Excel. The ribbon has a button named "Realtick ".
Clicking on it produces a drop-down box whose leftmost button is named either
"start" or "pause", either starting the data feed or interrupting it. This
is the action I'm trying to automate with a macro. It's easy using Sendkeys
but, as mentioned, this doesn't always work.

Thanks, Garry


Ok, so why are you using SendKeys if it has Ribbon controls?

Why add an additional macro to run a Ribbon menu when you could just click the
Ribbon menu? (OR you could add those as QAT buttons instead)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #7   Report Post  
Old February 27th 20, 06:32 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 61
Default Programmatic alternative to SendKeys

On Thursday, February 27, 2020 at 11:54:55 AM UTC-6, GS wrote:
On Thursday, February 27, 2020 at 6:22:38 AM UTC-6, GS wrote:
On Wednesday, February 26, 2020 at 3:21:07 PM UTC-6, GS wrote:
Hi, I'm finding that SendKeys is somewhat flakey, as noted by many
people.

I'm using it in Excel to start and stop an external program, symbol
"RLT", but it does not always work, that is it will start but then not
stop. The same symbol "ST" is used for both actions.

The steps a

Application.SendKeys ("%")

Application.SendKeys ("RLT")

Application.SendKeys ("ST")

I have read that there is a VBA programmatic alterntive to this, can some
please guide me on how to write it?

Many thanks for all help. AM

What is the full name (path\filename) of the program?

--
Garry


Hi Garry, good to hear from you!

C:\RealTick\rt332.exe

As always, many thanks for your interest.

When RT332 is running, what is its window Title?

--
Garry


It doesn't have a window of its own. It operates in the background by
sending data into Excel. The ribbon has a button named "Realtick ©".
Clicking on it produces a drop-down box whose leftmost button is named either
"start" or "pause", either starting the data feed or interrupting it. This
is the action I'm trying to automate with a macro. It's easy using Sendkeys
but, as mentioned, this doesn't always work.

Thanks, Garry


Ok, so why are you using SendKeys if it has Ribbon controls?

Why add an additional macro to run a Ribbon menu when you could just click the
Ribbon menu? (OR you could add those as QAT buttons instead)

--
Garry


Because I may need to turn on or off the data feed when I'm not around to click it manually, which happens quite often. As an example, if the market generating the numbers closes at a given hour, the feed must be turned off just prior to the close, or else the numbers received after the close are meaningless.
  #8   Report Post  
Old February 27th 20, 06:43 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,182
Default Programmatic alternative to SendKeys

Because I may need to turn on or off the data feed when I'm not around to
click it manually, which happens quite often. As an example, if the market
generating the numbers closes at a given hour, the feed must be turned off
just prior to the close, or else the numbers received after the close are
meaningless.


Ok, so how are you managing this when not at the computer?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #9   Report Post  
Old February 27th 20, 07:09 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 61
Default Programmatic alternative to SendKeys

On Thursday, February 27, 2020 at 12:44:02 PM UTC-6, GS wrote:
Because I may need to turn on or off the data feed when I'm not around to
click it manually, which happens quite often. As an example, if the market
generating the numbers closes at a given hour, the feed must be turned off
just prior to the close, or else the numbers received after the close are
meaningless.


Ok, so how are you managing this when not at the computer?

--
Garry


With a simple Sendkeys macro (I have shown it in my original post). It works sometimes, sometimes not. That's the reason I thought there may be a "deeper" programmatic way to do it.

Thanks again.

  #10   Report Post  
Old February 27th 20, 07:28 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,182
Default Programmatic alternative to SendKeys

On Thursday, February 27, 2020 at 12:44:02 PM UTC-6, GS wrote:
Because I may need to turn on or off the data feed when I'm not around to
click it manually, which happens quite often. As an example, if the market
generating the numbers closes at a given hour, the feed must be turned off
just prior to the close, or else the numbers received after the close are
meaningless.


Ok, so how are you managing this when not at the computer?

--
Garry


With a simple Sendkeys macro (I have shown it in my original post). It works
sometimes, sometimes not. That's the reason I thought there may be a
"deeper" programmatic way to do it.

Thanks again.


You've only shown lines of code from your macro, not the entire macro code!

You can replace the SendKeys lines with code to call the individual Ribbon
controls that fire those events (start,pause,stop) if they are individual
menuitems. See here...

http://www.rondebruin.nl/win/section2.htm

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Alternative to SendKeys for field that' not in tab sequence BillyRogers Excel Programming 7 October 4th 07 11:56 PM
Programmatic Hiding [email protected] Excel Discussion (Misc queries) 2 September 29th 07 01:13 PM
Sendkeys alternative to help with XL Extras - Jim Cone Mike K Excel Programming 5 March 28th 07 02:51 AM
Sendkeys alternative to help with XL Extras - Jim Cone Gary''s Student Excel Programming 0 March 27th 07 11:40 PM
Alternative to SendKeys Garry Rathbone Excel Programming 1 July 28th 04 12:36 PM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017