Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Picture Box (Excel 2003)

    Is there no Picture Box control tool in VBA?
    I wanted to use one to display data (ex. picDisplay.Print "blah"; Tab(15); "blah" )

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

    Re: Picture Box (Excel 2003)

    You can create a userform in the Visual Basic Editor (Insert | UserForm) and populate it with labels, text boxes, image controls etc.

    The method you cite is not used much in VBA (except in the Immediate window, or when writing to text files).

  3. #3
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Box (Excel 2003)

    I understand how to use user forms.
    My question was specifically directed towards the Picture Box Control. It is not on the standard toolbar, and I wasnt able to find it in the list of 'Additional Controls'.

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

    Re: Picture Box (Excel 2003)

    The VB6 PictureBox control is not available in VBA. There is an Image control, and a Frame (group box).

  5. #5
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Box (Excel 2003)

    Image control doesnt have the .print property...

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

    Re: Picture Box (Excel 2003)

    No, as far as I know there is no VBA control with that feature. You'll have to set the caption of a label, or the text of a text box.

  7. #7
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Box (Excel 2003)

    It should be possible to download the picturebox.ocx file and add it to my list of controls.
    Any idea where I could find it?

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

    Re: Picture Box (Excel 2003)

    If you tried to use the VB6 one, you'd probably get a message that you don't have a license to use it. You can do a Google search for [download picturebox control, a quick glance gives the impression that you should be able to find something. Be careful, some sites offering free downloads may try to install adware/spyware.

  9. #9
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    Toronto, Ontario, Canada
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Box (Excel 2003)

    Ok, I've downloaded a PictureBox.ocx file, placed it in my windows/system32 directory and run regsvr32.exe on it. Then I added it in my list of references and on my list of "Additional Controls", so I now have it on my control list. However, whenever I use it, I get the error:
    "This version S309 PictureBox control is not allowed to be used as a runtime control on the desktop"
    Any ideas..?

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

    Re: Picture Box (Excel 2003)

    I don't know much about this kind of thing, but a quick Google search suggests that the S309 Picturebox control is meant for NS Basic, whatever that may be. Perhaps it's not intended for use in VBA?

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

    Re: Picture Box (Excel 2003)

    NS Basic lets you quickly produce standalone, royalty free applications.

    Its power goes beyond most Basic implementations with its ability to use standard Windows components easily.

    You can connect to databases like ADO, SQL and Oracle, communicate with the internet and devices, play movies and music, manipulate Excel spreadsheets and much, much more!

    Seems you will need this installed before you can use your PictureBox control!
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    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
  •