Results 1 to 4 of 4

Thread: [RESOLVED] Copy Controls (including formatting) from Worksheet to UserForm

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    27

    Resolved [RESOLVED] Copy Controls (including formatting) from Worksheet to UserForm

    I have a lot of controls (CommandButtons, ListBoxes, Textboxes, Checkboxes, etc.) that are currently in a worksheet. They all have very specific color-coding and size formatting, which I would hate to lose as I am trying to move them to a UserForm created in VB. Is there any way that I can copy them from the Worksheet to a UserForm?

    I understand that I could recreate each button, then just copy the code from the various Modules, but it would be incredibly tedious to recreate each button. Thanks.

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Copy Controls (including formatting) from Worksheet to UserForm

    Yes you can do it...

    Simply drag the control directly from the worksheet and put it into the Userform. See the pic attached. However, you cannot do it vice versa. If you try doing it then the cursor will turn into a "No Cursor" (a circle with a diagonal line through it)

    Hope this helps...
    Attached Images Attached Images  
    Last edited by Siddharth Rout; Feb 4th, 2010 at 12:51 PM.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    27

    Re: Copy Controls (including formatting) from Worksheet to UserForm

    Perfect! Thanks Koolsid. I have no clue how you are able to be on here, answering everyone's questions every day, but thanks a lot!

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Copy Controls (including formatting) from Worksheet to UserForm

    Quote Originally Posted by Cristobal16 View Post
    Perfect! Thanks Koolsid. I have no clue how you are able to be on here, answering everyone's questions every day, but thanks a lot!
    You are welcome. Well, I get to learn lot of things here in VBF... that's why
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width