ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can't 'tick' box on fom with Sendkeys {SPACEBAR} (https://www.excelbanter.com/excel-programming/338597-cant-tick-box-fom-sendkeys-%7Bspacebar%7D.html)

Zakynthos

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the checkbox I
want to select) I achieve the same thing, i.e. the label to the checkbox is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys "{Space}", Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I need a tick in!

Any alternatives?

Tom Ogilvy

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the checkbox I
want to select) I achieve the same thing, i.e. the label to the checkbox

is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys "{Space}",

Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I need a tick

in!

Any alternatives?




Zakynthos

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
I'm sorry, I did not explain myself very well!!!

I want to put a tick into a form into a third part (non Microsoft)
application. I know that the VB code you give will tick a checkbox in an
Excel workbook but, given that the Sendkeys "" or Sendkeys "{SPACE}" command
has no effect in the window of the application's form I wish to tick a box
in, is there an alternative code I could use that would work?

"Tom Ogilvy" wrote:

if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the checkbox I
want to select) I achieve the same thing, i.e. the label to the checkbox

is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys "{Space}",

Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I need a tick

in!

Any alternatives?





Tom Ogilvy

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
No. Not unless the third party app supports automation or command line
arguments.

--
Regards,
Tom Ogilvy

"Zakynthos" wrote in message
...
I'm sorry, I did not explain myself very well!!!

I want to put a tick into a form into a third part (non Microsoft)
application. I know that the VB code you give will tick a checkbox in an
Excel workbook but, given that the Sendkeys "" or Sendkeys "{SPACE}"

command
has no effect in the window of the application's form I wish to tick a

box
in, is there an alternative code I could use that would work?

"Tom Ogilvy" wrote:

if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the

checkbox I
want to select) I achieve the same thing, i.e. the label to the

checkbox
is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys "{Space}",

Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I need a

tick
in!

Any alternatives?







Zakynthos

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
I think the application I'm using does support automation, as I'm able to use
Sendkey commands for most things like entering data, going to next page etc
etc.

So how do I get a tick in the box without using Sendkey "{SPACE}" etc which
plainly doesn't work?

"Tom Ogilvy" wrote:

No. Not unless the third party app supports automation or command line
arguments.

--
Regards,
Tom Ogilvy

"Zakynthos" wrote in message
...
I'm sorry, I did not explain myself very well!!!

I want to put a tick into a form into a third part (non Microsoft)
application. I know that the VB code you give will tick a checkbox in an
Excel workbook but, given that the Sendkeys "" or Sendkeys "{SPACE}"

command
has no effect in the window of the application's form I wish to tick a

box
in, is there an alternative code I could use that would work?

"Tom Ogilvy" wrote:

if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the

checkbox I
want to select) I achieve the same thing, i.e. the label to the

checkbox
is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys "{Space}",
Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I need a

tick
in!

Any alternatives?







Tim Williams

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
Senkeys is not automation - it just mimics the keyboard input.
By automation I would guess Tom is referring to COM automation.

You could try a third-party "macro" solution (AutoIt?)

Tim.

--
Tim Williams
Palo Alto, CA


"Zakynthos" wrote in message
...
I think the application I'm using does support automation, as I'm able to

use
Sendkey commands for most things like entering data, going to next page

etc
etc.

So how do I get a tick in the box without using Sendkey "{SPACE}" etc

which
plainly doesn't work?

"Tom Ogilvy" wrote:

No. Not unless the third party app supports automation or command line
arguments.

--
Regards,
Tom Ogilvy

"Zakynthos" wrote in message
...
I'm sorry, I did not explain myself very well!!!

I want to put a tick into a form into a third part (non Microsoft)
application. I know that the VB code you give will tick a checkbox in

an
Excel workbook but, given that the Sendkeys "" or Sendkeys "{SPACE}"

command
has no effect in the window of the application's form I wish to tick

a
box
in, is there an alternative code I could use that would work?

"Tom Ogilvy" wrote:

if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you

are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the

checkbox I
want to select) I achieve the same thing, i.e. the label to the

checkbox
is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys

"{Space}",
Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I

need a
tick
in!

Any alternatives?









Zakynthos

Can't 'tick' box on fom with Sendkeys {SPACEBAR}
 
Tim,

Many thanks for your help, I'll certainly try AutoIT.

Tony

"Tim Williams" wrote:

Senkeys is not automation - it just mimics the keyboard input.
By automation I would guess Tom is referring to COM automation.

You could try a third-party "macro" solution (AutoIt?)

Tim.

--
Tim Williams
Palo Alto, CA


"Zakynthos" wrote in message
...
I think the application I'm using does support automation, as I'm able to

use
Sendkey commands for most things like entering data, going to next page

etc
etc.

So how do I get a tick in the box without using Sendkey "{SPACE}" etc

which
plainly doesn't work?

"Tom Ogilvy" wrote:

No. Not unless the third party app supports automation or command line
arguments.

--
Regards,
Tom Ogilvy

"Zakynthos" wrote in message
...
I'm sorry, I did not explain myself very well!!!

I want to put a tick into a form into a third part (non Microsoft)
application. I know that the VB code you give will tick a checkbox in

an
Excel workbook but, given that the Sendkeys "" or Sendkeys "{SPACE}"
command
has no effect in the window of the application's form I wish to tick

a
box
in, is there an alternative code I could use that would work?

"Tom Ogilvy" wrote:

if a check box from the control toolbox toolbar
activesheet.Checkbox1.Value = True

or if a checkbox from the forms toolbar

activesheet.Checkboxes("Check Box 1").Value = xlOn

If you are using some built in dialog, then explain exactly what you

are
trying to do.

--
Regards,
Tom Ogilvy


"Zakynthos" wrote in message
...
If I send two Sendkeys "{TAB}" commands (from 2 tabs above the
checkbox I
want to select) I achieve the same thing, i.e. the label to the
checkbox
is
'selected' (dotted rectangle) but Sendkeys "" or Sendkeys

"{Space}",
Sendkeys
"{SPC}" or Sendkeys "{Spacebar}" won't put a tick in the box I

need a
tick
in!

Any alternatives?











All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com