Results 1 to 12 of 12

Run-Time Error While Loading Chart On UserForm Image

Threaded View

  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!

    Private Sub Load_Chart()
    Dim sh As Worksheet
    Dim myChart As Chart
    Set sh = ThisWorkbook.Sheets("RC Category")
    If IsNumeric(Me.TextBox11.Value) = True Then
        Set myChart = sh.Shapes("MM_CHART").Chart
        myChart.Export VBA.Environ("TEMP") & Application.PathSeparator & "MYCHART.jpg"
        Me.Image2.Picture = LoadPicture(VBA.Environ("TEMP") & Application.PathSeparator & "MYCHART.jpg")
    End If
    End Sub
    
    
    Private Sub UserForm_Activate()
    Call Load_Chart
    End Sub
    Looking forward your valuable Suggestion!

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

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. [SOLVED] 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