Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Macro to change checkbox properites

  1. #1
    Join Date
    22nd March 2003
    Posts
    141

    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.
    VB:
    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 at 08:34. Reason: VBA Code Tags - jiuk

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th December 2004
    Location
    Nanaimo, Vancouver Island, British Columbia, Canada
    Posts
    2,464

    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:

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

    Cheers,

    dr

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    22nd March 2003
    Posts
    141

    Re: Macro to change checkbox properites

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

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 6
    Last Post: June 4th, 2008, 05:12
  2. Link CheckBox To Worksheet Change Event
    By Addy in forum EXCEL HELP
    Replies: 7
    Last Post: July 17th, 2007, 15:14
  3. Change Checkbox Name From Worksheet
    By HxF in forum EXCEL HELP
    Replies: 1
    Last Post: January 20th, 2007, 02:05
  4. Replies: 3
    Last Post: June 14th, 2006, 05:15
  5. Multiple Checkbox value change on Keypress
    By alexedwardsuk in forum EXCEL HELP
    Replies: 3
    Last Post: November 18th, 2005, 21:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno