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
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
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
Place this code in a blank userform and experiment with it.
Please Login or Register to view this content.
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
I doubt that will happen, you probably need to add the buttons and edit them to do what you want.
Yes i know
but i need to learn how to do that with copy paste
can that?????
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
ok so it can't be done thank u davesexcel
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks