+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] VBA Changing button.caption with the same Button.Name

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    Quezon City
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    75

    [SOLVED] VBA Changing button.caption with the same Button.Name

    I have a problem with my code. There is an error written as BOLD characters in the code section.

    I have a sheet that I want to change all of my button.caption named btn1, btn2, btn3, btn4, btn5...... so on and so for at least 49 buttons.

    Please Login or Register  to view this content.
    P.S: Developer Tab -> Form Control -> Button
    Last edited by mcmunoz; 09-27-2013 at 04:50 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Changing button.caption with the same Button.Name

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    Quezon City
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    75

    Re: VBA Changing button.caption with the same Button.Name

    Quote Originally Posted by Andy Pope View Post
    Please Login or Register  to view this content.
    Nice code!
    Thanks for helping me Andy. Its working, I can now proceed to my work.

    Can I have a favor, can you give me a link all about information/syntax of a form button.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: [SOLVED] VBA Changing button.caption with the same Button.Name

    As the code defines the object as a shape you should get intellisense.

    You could try using the object browser (F2) in VBE

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Changing the Caption of an Option button in a userform using vba
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2012, 12:11 PM
  2. [SOLVED] Is it possible to do a comm.button with scrolling caption /changing caption?
    By Lkivagten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2012, 08:10 AM
  3. Changing Command Button Caption with userform Open
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2011, 08:09 PM
  4. Changing the caption of a Command Button
    By Colin M in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2007, 12:24 PM
  5. [SOLVED] changing the caption of a command button
    By JWCrosby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2005, 04:15 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1