Results 1 to 5 of 5

Using Variables Within Button Actions

Threaded View

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    A Place
    MS-Off Ver
    Excel 2003
    Posts
    3

    Using Variables Within Button Actions

    I am using a large number (21 presently, growing later) of buttons on one particular sheet,
    and rather than specifying B1.Visible = False .. B21.Visible = False, can I use a For statement somehow?
    For Butt = 1 To 21
        ("B" & Butt).Visible = False
    End For
    Also, all these buttons will be assigned variables based on their unique functions before referincing a generic function. i.e.

    'Each Button pressed disables the previous button
    ("B" & (Butt - 1)).Enabled = False
    Is there anyway to do this, or am I going to have to do it the long way, of copy and paste 21 times and renaming?

    Any assistance available?

    Thanks!
    Last edited by romperstomper; 09-30-2011 at 02:51 AM. Reason: tags

Thread Information

Users Browsing this Thread

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

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