Just a question/comment...

Things like this always scare me a little:

Set myCBX = SeriesWorkbook.ActiveSheet.CheckBoxes(CheckBoxName)

How do you know for sure what the activesheet in that workbook is?

If possible, I like to specify that sheet by name:

Set myCBX _
= SeriesWorkbook.Worksheets("sheetnamehere").CheckBoxes(CheckBoxName)




[email protected] wrote:
>
> Dave,
>
> thanks for your help, i managed to achieve what i wanted to do with
> your help.
>
> for future reference:
> now that i worked out how to do it i can also explain better what i
> want to do:-)
>
> i want to execute a macro assigned to a checkbox in vba, while in the
> code all i have is the name of the checkbox, my final code looks like
> this:
>
> dim myCBX as checkbox
> dim checkBoxAction as String
>
> Set myCBX = seriesWorkbook.ActiveSheet.CheckBoxes( checkBoxName)
> checkBoxAction = myCBX.OnAction
> If "" <> checkBoxAction Then
> Run checkBoxAction
> End If
>
> before i had allready tried:
> Run myCBX.OnAction
> in analogy to a button control, but that doesn't work.
>
> thanks again for your help,
>
> Pieter


--

Dave Peterson