ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vba checkbox (https://www.excelbanter.com/excel-programming/311948-vba-checkbox.html)

gareth thomson

vba checkbox
 
I have some vba checkboxes on a spreadsheet, and I want to
be able to toggle them programmatically from another
application. I have tried code like:

XL.ActiveSheet.OLEObjects("CheckBox2").Object.Valu e = True

but it doesn't work. What am I doing wrong? Thanks in
advance.


Kevin

vba checkbox
 
Try creating a macro as a standard module then run that
module from your other application something like this:

Application.Run "'" & ActiveWorkbook.Name & "'!
module1.procedureName", param1, param2, etc.

Kevin
-----Original Message-----
I have some vba checkboxes on a spreadsheet, and I want

to
be able to toggle them programmatically from another
application. I have tried code like:

XL.ActiveSheet.OLEObjects("CheckBox2").Object.Val ue = True

but it doesn't work. What am I doing wrong? Thanks in
advance.

.


No Name

vba checkbox
 
Thanks for your post, Kevin. Not sure how to implement
your suggestion. Even w/in an Excel module I don't know
the syntax to reference a vba checkbox... or rather I can
reference checkboxes... and obtain their value, I just
don't know how to set the value of a specific checkbox.

thnx again


-----Original Message-----
Try creating a macro as a standard module then run that
module from your other application something like this:

Application.Run "'" & ActiveWorkbook.Name & "'!
module1.procedureName", param1, param2, etc.

Kevin
-----Original Message-----
I have some vba checkboxes on a spreadsheet, and I want

to
be able to toggle them programmatically from another
application. I have tried code like:

XL.ActiveSheet.OLEObjects("CheckBox2").Object.Va lue =

True

but it doesn't work. What am I doing wrong? Thanks in
advance.

.

.



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

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