+ Reply to Thread
Results 1 to 2 of 2

Copy a form control button to new cell, with button click, and maintain button caption

  1. #1
    Registered User
    Join Date
    02-27-2017
    Location
    Göteborg
    MS-Off Ver
    2010
    Posts
    1

    Copy a form control button to new cell, with button click, and maintain button caption

    Hello,
    I am new to VBA and was looking for some help.
    My file is a sports betting draw game, that I am trying to automate better.
    Previously, I was using a data verification/drop down list for selections, in the beige fields.
    Now I am tinkering with using form control buttons. My desire is to have form control buttons for each player.
    When the user clicks on this player, that button (identical caption) moves to the next position in the draw.
    I have this sub routine right now, and looking to build it out. The sub routine successfully places a button in the activecell, with
    the correct size, the caption however doesn't follow, which is what I need help with.
    First time posting, sorry if I am not clear.

    Sub Button37_Click()
    Call buttonInACell
    End Sub

    Sub buttonInACell()
    Dim btn As Button
    Dim t
    Set t = ActiveCell
    Set btn = ActiveSheet.Buttons.Add(t.Left, t.Top, t.Width, t.Height)

    End Sub

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Copy a form control button to new cell, with button click, and maintain button caption

    You can set the caption and buttons action

    Please Login or Register  to view this content.

+ 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] Form - select button & retrieve button name or button's caption
    By lexusap in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2016, 12:28 AM
  2. ActiveX Control Spin Button Copy Button and Change Cell reference?
    By chrstphrbllngs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2016, 04:01 PM
  3. Simple form control Macro to sort row or rows on button click?
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2014, 02:06 PM
  4. How I do disable and enable web browser control in access form on button click
    By krjoshi in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2013, 02:58 PM
  5. [SOLVED] get caption of the button you click
    By pankajy18 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-10-2013, 11:35 AM
  6. Hide a picture button placed in all sheets using a option button (form control)
    By lagaranch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-26-2012, 10:33 AM
  7. ActveX Control Button Not Working But Form Control Button is
    By MikeTruth in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2012, 05:04 AM

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