+ Reply to Thread
Results 1 to 5 of 5

Code an image viewer inside XL

  1. #1
    quartz
    Guest

    Code an image viewer inside XL

    I am using Office 2003 on Win XP.

    Is it possible to code a simple image viewer inside an MS-Excel sheet;
    perhaps code the drawing of an ActiveX control or some such control and then
    allow the user to select a subfolder of images to display. There would need
    to be a scroll button or other control to allow the user to scroll forward
    and backward through the images contained in the folder.

    I thought of just using the file open dialog and then switch the view to
    thumbnail, but the images don't display large enough or in enough detail.

    Any ideas? Thanks.

  2. #2
    Tom Ogilvy
    Guest

    RE: Code an image viewer inside XL

    this would be a good start:

    http://www.mcgimpsey.com/excel/lookuppics.html

    --
    Regards,
    Tom Ogilvy


    "quartz" wrote:

    > I am using Office 2003 on Win XP.
    >
    > Is it possible to code a simple image viewer inside an MS-Excel sheet;
    > perhaps code the drawing of an ActiveX control or some such control and then
    > allow the user to select a subfolder of images to display. There would need
    > to be a scroll button or other control to allow the user to scroll forward
    > and backward through the images contained in the folder.
    >
    > I thought of just using the file open dialog and then switch the view to
    > thumbnail, but the images don't display large enough or in enough detail.
    >
    > Any ideas? Thanks.


  3. #3
    quartz
    Guest

    RE: Code an image viewer inside XL

    Thanks Tom, interesting approach, the problem is, the images I'm working with
    will be pretty dynamic, but this idea does put some wheels in motion.

    I suppose I could code a program to copy the names of all the images into a
    drop down from which the user would pick one; the program would then draw the
    image.

    Due to many users, I was hoping that each user could load a viewer which
    they could drag to the appropriate max size for their screen, then all
    subsequent images will fill the space available.

    Bearing in mind that we need an in-house developed VBA solution, any other
    thoughts? I noticed that there is a "SnapShotViewer" control, but I don't
    know what it is or how to code it...

    Thanks again for any further input.

    "Tom Ogilvy" wrote:

    > this would be a good start:
    >
    > http://www.mcgimpsey.com/excel/lookuppics.html
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "quartz" wrote:
    >
    > > I am using Office 2003 on Win XP.
    > >
    > > Is it possible to code a simple image viewer inside an MS-Excel sheet;
    > > perhaps code the drawing of an ActiveX control or some such control and then
    > > allow the user to select a subfolder of images to display. There would need
    > > to be a scroll button or other control to allow the user to scroll forward
    > > and backward through the images contained in the folder.
    > >
    > > I thought of just using the file open dialog and then switch the view to
    > > thumbnail, but the images don't display large enough or in enough detail.
    > >
    > > Any ideas? Thanks.


  4. #4
    Tom Ogilvy
    Guest

    RE: Code an image viewer inside XL

    If you want an embedded control that provides an interface for the user to
    load images - I would suspect there are some, but I am not familiar with
    them.

    --
    Regards,
    Tom Ogilvy


    "quartz" wrote:

    > Thanks Tom, interesting approach, the problem is, the images I'm working with
    > will be pretty dynamic, but this idea does put some wheels in motion.
    >
    > I suppose I could code a program to copy the names of all the images into a
    > drop down from which the user would pick one; the program would then draw the
    > image.
    >
    > Due to many users, I was hoping that each user could load a viewer which
    > they could drag to the appropriate max size for their screen, then all
    > subsequent images will fill the space available.
    >
    > Bearing in mind that we need an in-house developed VBA solution, any other
    > thoughts? I noticed that there is a "SnapShotViewer" control, but I don't
    > know what it is or how to code it...
    >
    > Thanks again for any further input.
    >
    > "Tom Ogilvy" wrote:
    >
    > > this would be a good start:
    > >
    > > http://www.mcgimpsey.com/excel/lookuppics.html
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "quartz" wrote:
    > >
    > > > I am using Office 2003 on Win XP.
    > > >
    > > > Is it possible to code a simple image viewer inside an MS-Excel sheet;
    > > > perhaps code the drawing of an ActiveX control or some such control and then
    > > > allow the user to select a subfolder of images to display. There would need
    > > > to be a scroll button or other control to allow the user to scroll forward
    > > > and backward through the images contained in the folder.
    > > >
    > > > I thought of just using the file open dialog and then switch the view to
    > > > thumbnail, but the images don't display large enough or in enough detail.
    > > >
    > > > Any ideas? Thanks.


  5. #5

    Re: Code an image viewer inside XL

    This is kind of primitive but maybe this will get you started:

    Create a blank userform with this code
    on your userform module:

    Private Sub UserForm_Initialize()
    fsFile = Application.Selection.Value
    UserForm1.Caption = fsFile
    UserForm1.Picture = LoadPicture(fsFile)
    End Sub

    Private Sub UserForm_Click()
    Unload Me
    End Sub

    This allows loading a picture on the form using a filepath
    that you an import onto your excel sheet.
    The code picks up the filepath you have selected on
    your excel sheet. When you click the userform,
    it unloads.

    On your excel sheet create a command button.
    On your standard module add this code:

    Dim fsFile As FileSearch

    Private Sub CommandButton1_Click()
    UserForm1.Show vbModeless
    End Sub

    On your excel sheet you will need to import a file list of
    images that the user can click on for example:

    c:\wtc1.jpg
    c:\chatwood1_la.jpg

    -- Jim


    quartz wrote:
    > I am using Office 2003 on Win XP.
    >
    > Is it possible to code a simple image viewer inside an MS-Excel sheet;
    > perhaps code the drawing of an ActiveX control or some such control and then
    > allow the user to select a subfolder of images to display. There would need
    > to be a scroll button or other control to allow the user to scroll forward
    > and backward through the images contained in the folder.
    >
    > I thought of just using the file open dialog and then switch the view to
    > thumbnail, but the images don't display large enough or in enough detail.
    >
    > Any ideas? Thanks.



+ 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