vba checkbox

  • Thread starter Thread starter gareth thomson
  • Start date Start date
G

gareth thomson

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.Value = True

but it doesn't work. What am I doing wrong? Thanks in
advance.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top