Passing Arguments to Method registered with onAction Event(VBA - Excel)

后端 未结 3 925
死守一世寂寞
死守一世寂寞 2021-01-19 07:19

How do you pass an argument to a method which is registered with the onAction event in Excel VBA?

The code I have is:

With ActiveSheet.CheckBoxes.Add         


        
3条回答
  •  有刺的猬
    2021-01-19 07:53

    Change this:

    .OnAction = "CheckboxChange"
    

    To this:

    .OnAction = "'CheckboxChange""" & rCell & """'"
    

    """ = 3 double quotes

    """'" = 3 double quotes & 1 single quote & 1 double quote

提交回复
热议问题