Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Macro to change checkbox properites

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Macro to change checkbox properites

    I am trying to change the caption of a checkbox by way of Macro. Here is one of the many variations I have tried with no success.

    Sub Caption()
    Dim myControl As CheckBox
    Set myControl = ActiveSheet.Shapes("cVISA")
    myControl.Caption = "Caption Change Test"
    End Sub

    I have tried this with and without "Set", with and without using the variable.
    Last edited by Jack in the UK; June 5th, 2005, 07:34. Reason: VBA Code Tags - jiuk

  • #2
    Re: Macro to change checkbox properites

    Hi,

    Just a a reminder about code tags. [ code ] ...your code here... [ / code ]

    Use as above without spaces between the [cword] and [/cword].

    Here's your solution:

    Code:
    Sub Caption()
    
    Dim myControl As Object
    
    Set myControl = ActiveSheet.cVISA
    
    myControl.Caption = ("Caption Change Test")
    
    End Sub

    Cheers,

    dr
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http://www.ExcelVBA.joellerabu.com

    Comment


    • #3
      Re: Macro to change checkbox properites

      Yes, that was my solution. Thanks!
      Sorry about the tags, I will figure out how to use them.

      Comment

      Trending

      Collapse

      There are no results that meet this criteria.

      Working...
      X