+ Reply to Thread
Results 1 to 12 of 12

Run-Time Error While Loading Chart On UserForm Image

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Run-Time Error While Loading Chart On UserForm Image

    Dear Friends,

    I have Graph Named As “MM_CHART” on my worksheet i.e. “RC Category”

    Same Graph I would like to load on my userfrom (image2) when it gets Initialized or Activated

    Below is the VBA Code which I am trying to use it. But it doesn’t load the Chart into Userfrom Image2

    Please suggest me an alternate code which suits my requirement!

    Please Login or Register  to view this content.
    Looking forward your valuable Suggestion!

    Thanks & Regards,
    Rajeshkumar R
    Last edited by Rajeshkumar R; 04-01-2020 at 02:05 PM. Reason: Query Resolved

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Run-Time Error While Loading Chart On UserForm Image

    First does the image get created?

    Then is the image control configured to show the image correctly? Try setting the image to stretch fill the control
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: Run-Time Error While Loading Chart On UserForm Image

    Dear Andy Pope,

    Tried amending properties as "Try setting the image to stretch fill the control" still chart not loaded on Userform

    Regards,
    Rajeshkumar R

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Run-Time Error While Loading Chart On UserForm Image

    The post an example file, as that code looks okay

  5. #5
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: Run-Time Error While Loading Chart On UserForm Image

    Dear Andy Popo,

    I am getting Following Error on highlighted Code when I am trying to Execute

    Run-time Error '-214702424809(80070057)':
    This member can only be accessed for a Chart Object
    Please Login or Register  to view this content.
    Thanks!
    Rajeshkumar R

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Run-Time Error While Loading Chart On UserForm Image

    Hi Rajeshkumar,
    Have you seen the yellow banner at the top?
    The code at first glance looks fine (at least for me), so before trying to help you more, I shall re-create the file.
    Why shall I?
    If you have no time to spare on such task, I also have no time for it.
    Best Regards,

    Kaper

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Run-Time Error While Loading Chart On UserForm Image

    That error suggests the shape is not a chart

    As requested post example file

  8. #8
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Run-Time Error While Loading Chart On UserForm Image

    Works perfectly - are you sure your chart on worksheet is named MM_CHART and is a chart
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by nigelog; 04-01-2020 at 07:17 AM.

  9. #9
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: Run-Time Error While Loading Chart On UserForm Image

    Dear Experts,

    My Apology on the Confusion here; I should have loaded the sample workbook beginning itself.

    Please refer the attached Workbook and suggest me where I am going wrong and how to correct it?

    Thanks & Regards,
    Rajeshkumar R
    Attached Files Attached Files

  10. #10
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Run-Time Error While Loading Chart On UserForm Image

    If you run this you will see your picture/image is not listed as a chart on the worksheet
    Please Login or Register  to view this content.
    attached file loads the part of the image called "Chart 2"
    Attached Files Attached Files
    Last edited by nigelog; 04-01-2020 at 12:09 PM.

  11. #11
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: Run-Time Error While Loading Chart On UserForm Image

    Dear nigelog ,

    Noted, Thanks a lot for your extended support. I could achieve what I was looking for!

    Thanks & Regards,
    Rajeshkumar R

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Run-Time Error While Loading Chart On UserForm Image

    Do you really need to export the chart as an image in order to reload on the userform?

    Why not have static images where the person is a separate image that position on the form depending on the value. You just need to calculate the width of an image as a percentage and then reposition the image of the person.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Updating an image on a userform every time the userform is shown
    By Raylou in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2018, 01:09 AM
  2. Replies: 1
    Last Post: 07-14-2016, 04:59 AM
  3. [SOLVED] Copy Shapes during Run-Time into Userform Image
    By Joakim N in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2012, 02:08 AM
  4. Problem putting a chart into a userform image frame
    By shakey775 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-19-2012, 08:54 AM
  5. Run Time Error 429 when loading userform
    By dmg75 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-16-2011, 07:08 AM
  6. Show a chart as an image on userform.
    By collegekid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2006, 06:10 PM
  7. Loading UserForm gives error
    By Mats Samson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2005, 04:05 AM

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