+ Reply to Thread
Results 1 to 9 of 9

Problem putting a chart into a userform image frame

  1. #1
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Problem putting a chart into a userform image frame

    Hi All

    I am having a problem putting a chart into a userform image frame
    the code is from the learnvba in 24 hours and is as follows

    Please Login or Register  to view this content.
    The image frame is in userform4
    when i try to run it i get a error 9 message

    I have copied the code exactly from the book bar subsituting the gif name

    any pointers would be great
    James
    Last edited by shakey775; 03-19-2012 at 08:55 AM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Problem putting a chart into a userform image frame

    This works , Modify to suit:-
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Re: Problem putting a chart into a userform image frame

    Cheers Mick
    which bits do i modify

    ?"GIF"

    james

  4. #4
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Re: Problem putting a chart into a userform image frame

    this is what i did but its retuning an error still

    Please Login or Register  to view this content.

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Problem putting a chart into a userform image frame

    If you have the chart on your sheet, the code will create a file "Temp.gif" with the same path as you workbook, so The code as is should work with your Userform with "Image1" image control on it.
    You just need to show the Userform i.e Userform1.show

  6. #6
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Problem putting a chart into a userform image frame

    That code worked for Me.
    Have you got he right chart
    Try
    Please Login or Register  to view this content.
    To make sure you talking about the correct chart name.

  7. #7
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Re: Problem putting a chart into a userform image frame

    Hi Mick
    it seem that when I went back to it this weekend your code worked
    I wonder if something just needed refreshing
    but a blindingly good solution thanks
    James

  8. #8
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Re: Problem putting a chart into a userform image frame

    Hi Mick
    After going back to it this weekend your solution worked a treat
    Thankyou for your patience
    James

  9. #9
    Registered User
    Join Date
    12-18-2011
    Location
    Back in Warwickshire
    MS-Off Ver
    365
    Posts
    59

    Re: Problem putting a chart into a userform image frame

    Hi all

    I am still having problems with this

    It works fine when a cell is selected on sheet4
    however if data has been entered into a the dynamic table that the chart "feeeds" off then another sheet is active and i get the error

    How do I automatically point to sheet 4 in the above code
    I have tried

    Please Login or Register  to view this content.
    but nothing works still

    james

+ 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