LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how to execute a macro assigned to a checkbox in vba

Hi,

For testing purposes i want to control a workbook from another workbook
with vba.

When setting a checkbox to 'checked', the macro assigned to the
checkbox is not executed.

the code i use is:

Dim name As String
Dim cbo As CheckBox

name = "some value read from a cell'
Set cbo = otherWorkbook.ActiveSheet.CheckBoxes(name)
cbo.value = 1 'make checkbox 'checked'

In similar code for buttons i use: Run button.OnAction, this does not
work for a checkbox though. Also i can't get the name of the macro from
the checkbox in vba.

Does anyone know how i can get the macro assigned to a checkbox to
execute from vba? Note that i don't know the macro name in the code,
only the name of the checkbox.

thanks

Pieter

 
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
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
Macro assigned to a button Sadcrab Excel Discussion (Misc queries) 12 December 8th 06 11:16 PM
How do I know what macro is assigned to a button? Denise in NC Excel Discussion (Misc queries) 3 April 3rd 06 02:31 PM
Which Macro Is Assigned to a Button SidBord Excel Programming 3 April 29th 04 07:57 PM
Buttons assigned to a macro Tokash Excel Programming 0 September 12th 03 08:58 PM


All times are GMT +1. The time now is 09: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"