+ Reply to Thread
Results 1 to 2 of 2

Linking buttons with a row

  1. #1
    Registered User
    Join Date
    11-23-2011
    Location
    Essex
    MS-Off Ver
    Excel 2003
    Posts
    1

    Linking buttons with a row

    If possible I would like to create using vba a button at the end of my rows of data allowing a user to copy and insert the row next to the button, i.e. duplicate.

    I am using the following code to create the button but am not clear how to link a button to a row or cell. The button would be within a cell in a row at the end of the data.

    Range("a2").Offset(rowoffset, 10).Select
    ActiveSheet.Buttons.Add ActiveCell.Left, ActiveCell.Top, ActiveCell.Width, ActiveCell.Height

    rowoffset increments within a loop and a button is placed at the end of each row of data.

    I would also like to know how to name the button.

    Have only been working with excel / vba a couple of week so coding is a little slow.

    Any help would be appreciated

    Thanks

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Linking buttons with a row

    It will be good if you attach your workbook along with the code so that we can understand your request better.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

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