AllExperts > VB Script 
Search      
VB Script
Volunteer
Answers to thousands of questions
 Home · More VB Script Questions · Answer Library  · Encyclopedia ·
More VB Script Answers
Question Library

Ask a question about VB Script
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Miguel Zapico
Expertise
I can answer question about how to use scripts to consolidate data, connect different systems and automate tasks. I have no experience on using VBScript on web programming.

Experience
I have been using VBScript and Windows Scripting Host as my swiss tool for the last 6 years.

Organizations
New York PC users group (NYPC)
Independant Computer Consultants Association (ICCA)

Education/Credentials
Microsoft MCSE in Windows NT

 
   

You are here:  Experts > Computing/Technology > Basic > VB Script > VBA

VB Script - VBA


Expert: Miguel Zapico - 7/24/2006

Question
I have declared an object variable for a class and instantiated. When a use a method available in the declared Class of the object variable, it gives an error message saying GET Method Failed.

Let me attach the code and the error message here with this mail below.

Dim Temp As XSCRIPTINGHOSTLib.ScriptItemDialog

-------------------------------------------------

Sub EntryLevelMacro()

Set Temp = New XSCRIPTINGHOSTLib.ScriptItemDialog

Temp.MessageBox "Info", "Show this message"

Set Temp = Nothing

End Sub

-------------------------------------------------


Error Message :

Run-time error '2147220604(80040384)':

Method 'MessageBox' of object 'IScriptItemDialog' failed

Answer
Sorry, I don't have that object on my system.  What application is it refered to?

Also, what is the context where you are programming?  For example, in VBA there is a msgbox function that can do what you need:

Sub EntryLevelMacro()
  MsgBox "Show this message", , "Info"
End Sub

Miguel.

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.