+ Reply to Thread
Results 1 to 2 of 2

Display AutoShape in UserForm

  1. #1
    Registered User
    Join Date
    07-14-2004
    Posts
    22

    Display AutoShape in UserForm

    I am trying to have AutoShapes displayed, specifically a green up arrow and red down arrrow, in a UserForm based on certain conditions. Any suggestions. Here is what I tried;

    Private Sub UserForm_Initialize()
    TextBox1.Object = AutoShape27
    End Sub

    Does not work.

    Please help.

  2. #2
    K Dales
    Guest

    RE: Display AutoShape in UserForm

    Userforms use the MSForms objects and so they don't natively support
    autoshapes. But you can insert an image control and then (either manually at
    setup time or through code) specify the picture to go in the image control.
    So if you make two picture files for your arrows you should be able to
    display them on the userform, something like this with the proper
    substitutions:

    If {whatever your condition is} Then _
    UserForm1.Image1.Picture = LoadPicture("C:\GreenArrow.bmp") Else _
    UserForm1.Image1.Picture = LoadPicture("C:\RedArrow.bmp")
    --
    - K Dales


    "bforster1" wrote:

    >
    > I am trying to have AutoShapes displayed, specifically a green up arrow
    > and red down arrrow, in a UserForm based on certain conditions. Any
    > suggestions. Here is what I tried;
    >
    > Private Sub UserForm_Initialize()
    > TextBox1.Object = AutoShape27
    > End Sub
    >
    > Does not work.
    >
    > Please help.
    >
    >
    > --
    > bforster1
    > ------------------------------------------------------------------------
    > bforster1's Profile: http://www.excelforum.com/member.php...o&userid=11771
    > View this thread: http://www.excelforum.com/showthread...hreadid=481825
    >
    >


+ 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