+ Reply to Thread
Results 1 to 8 of 8

copy command bouton

  1. #1
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    copy command bouton

    hi
    how to copy comand boton on userform 10 times to same userform under the command bouton1
    makin spaces between command buttons
    by code please
    not create
    copy paset

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: copy command bouton

    With standard tools:

    1) select a button, and copy
    2) paste it as many times as you need placing roughly where you want them
    3) select all, right click and from popup menu select left alignment. So you have horizontal placement ready
    4) look at properties (if not visible open properties window by pressing F4), namely on "Top"

    The top is a number (in pixels, which is a location of topleft button corner in userform. You can change these properties to form regular arithmetic progression.

    For example - you have 10 buttons. First have top at 5, last at 185 then the distance between corners of each 2 neighbours shall be 20
    (185-5)/(10-1) =20
    and property top shall be set for
    Button1: 5
    Button2: 25
    Button3: 45 and so on.
    Best Regards,

    Kaper

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

    Re: copy command bouton

    Place this code in a blank userform and experiment with it.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: copy command bouton

    thanx davesexcel
    but i need the code to copy command boutton1 on userform and past it 10 times on user form ...copy paste not add
    not Me.Controls.Add("Forms.CommandButton.1", s) i need copy past a command bouton1 by code please

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

    Re: copy command bouton

    I doubt that will happen, you probably need to add the buttons and edit them to do what you want.

  6. #6
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: copy command bouton

    Yes i know
    but i need to learn how to do that with copy paste
    can that?????

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

    Re: copy command bouton

    I just said it can't be done, you need to add the button and edit it so it does what you want to do. Or just copy and paste it manually as explained in post#2

  8. #8
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: copy command bouton

    ok so it can't be done thank u davesexcel

+ 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. Shell command to rum dos copy command on vba
    By lepmor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2015, 07:04 PM
  2. Copy relative formulas without using the Copy command?
    By OldManExcellor in forum Excel General
    Replies: 4
    Last Post: 07-18-2014, 04:56 AM
  3. [SOLVED] Create a bouton to save as a pdf a another sheet then the active sheet using a custom name
    By sunny_island2002 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-14-2012, 08:01 PM
  4. How to get new personalised bouton
    By feejo in forum Excel General
    Replies: 1
    Last Post: 08-15-2007, 02:39 PM
  5. Bouton inaccessible dans Excel 2002
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2006, 03:20 PM
  6. [SOLVED] Copy command
    By browie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2005, 08:05 AM
  7. [SOLVED] I want to combine a "match" command with a copy and paste command.
    By alomega in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2005, 02:06 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