Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Run-time error '-2147418113 (8000ffff)':

' Run-time error '-2147418113 (8000ffff)':
' Automation error

' I'm posting this to get it into the archives.
' I got this error and a search wasn't helpful.
' This is a simplified source of the error.
' Briefly, the error is in referencing an image
' that has been deleted/removed/destroyed/?.
' (Don't say it was a stupid thing to do --
' I've made it look simple)
' This assumes a UserForm1. Click it to run.
' D-C Dave XL97/WIN98

Sub Main()
UserForm1.Show
End Sub

Private Sub UserForm_Click() ' (in UserForm1)
Dim mpg1 As MultiPage, img1 As Image
Stop ' if you want to look
If img1 Is Nothing Then Beep ' ck
' create a multipage
Set mpg1 = UserForm1.Controls.Add("forms.multipage.1", "Multi1",
True)
' remove 2nd page
mpg1.Pages.Remove (1)
' create image on the multipage
Set img1 = mpg1.Pages(0).Add("forms.image.1", "Image1", True)
' img1 is nothing or something
If Not img1 Is Nothing Then img1.Tag = "X"
' remove last page
' image1 goes to ..? but VBA handles well
mpg1.Pages.Remove (0)
' img1 is worse than nothing
' It still points somewhere
If Not img1 Is Nothing Then img1.Tag = "Y" ' error
' so next time try to remember that img1 is a pointer
Set img1 = Nothing
End Sub

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
System error &H8000FFFF (-2147418113) Človíček Excel Programming 2 November 9th 06 01:22 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
System Error &H8000FFFF (-2147418113). Catastrophic Failure poppy Excel Programming 0 May 30th 05 01:40 PM
-2147418113 (out of memory) Ronald Dodge Excel Programming 1 September 1st 03 05:39 AM


All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"