Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Missing controls (Excel VBA)

    Hi,
    How can I draw a line or a rectangle on an Excel form? There is no controls like that on the toolbar! Any ideas?
    TX
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing controls (Excel VBA)

    You can use a group box - set its BorderStyle to 1 - fmBorderStyleSingle and clear its Caption. This gives you a rectangle. If you set its Height or Width to 1, you have a horizontal or vertical line.

    If you really need more, see Drawing on a userform on Andy Pope's website.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Missing controls (Excel VBA)

    Thanks for that link. I will experiment with that in the holidays. But for now, the group box will do. Great idea BTW! In retrospect its rather obvious to have used that, but I didn't know the caption could be switched off!
    Cheers
    Regards,
    Rudi

Posting Permissions

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