Results 1 to 8 of 8

Runtime Error 481 Invalid Picture

Threaded View

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    vienna
    MS-Off Ver
    Excel 2010
    Posts
    5

    Runtime Error 481 Invalid Picture

    hello,

    iīve a very big Problem to view a diagram in a userform. i get always the error runtime error 481 invalid Picture and i didnīt find any solution.
    maybe you can help me.

    Iīve a userform and a makro

    here is the makro code

    when i click on the degugg button the following code will be Show in yellow

    UserForm8.Image1.Picture = LoadPicture(dateiname)



    Sub Bild_Anzeigen(strTab As String, strDia As String)
             ActiveSheet.Unprotect Password:="test"
                 Dim Diagramm As Object
                 Dim dblBreite As Double
                 Dim dblHoehe As Double
                 Set Diagramm = Worksheets(strTab).ChartObjects(strDia).Chart
                 With Diagramm.Parent
                   dblHoehe = .Height
                   dblBreite = .Width
                   .Height = dblHoehe
                   .Width = dblBreite
                   Dateiname = ThisWorkbook.Path & Application.PathSeparator & "diagramm.bmp"
                 End With
                 Diagramm.Export Filename:=Dateiname, FilterName:="bmp"
                 With UserForm8
                   .Image1.Width = Diagramm.Parent.Width
                   .Image1.Height = Diagramm.Parent.Height
                   .Width = .Image1.Width + 15
                   .Height = .Image1.Height + 30
                 End With
                 UserForm8.Image1.Picture = LoadPicture(Dateiname)
                 With Diagramm.Parent
                   .Height = Diagramm.Parent.Height
                   .Width = Diagramm.Parent.Width
                 End With
                 Kill Dateiname
                 UserForm8.Show
                 ActiveSheet.Protect Password:="test", DrawingObjects:=False, Contents:=True, Scenarios:= _
                     True, AllowFiltering:=True
             End Sub
    Moderator Note:

    Pls use code tags around your code next time as per forum rules.
    Last edited by Fotis1991; 10-02-2013 at 02:22 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Runtime Error 481 Invalid Picture
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-25-2013, 05:16 AM
  2. Runtime Error 481 invalid figure when PNG
    By Stingone in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2013, 03:57 PM
  3. [SOLVED] VBA - runtime error 94, invalid use of null
    By arneld in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2012, 06:46 PM
  4. Runtime Error 5: Invalid procedure call or argument
    By Arasi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2009, 11:49 AM
  5. Runtime Error '3001' Invalid Argument???
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2008, 10:16 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