Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Help "438 - Object doesn't support this property or method"

Hello,

My code is getting the error '438 - Object doesn't support this
property or method' in my VBA Excel app that uses a web service. I
suspect, however, that the problem is a basic VBA one, as I am not very
familiar with VBA.

I created the objects via the Web Services Reference tools (referencing
the URL of the WSDL) with no problems, and got the following class
modules:

clws_Factory_CustomerQuery
clws_CustomerQuery
struct_AniDnis
struct_QueryResult

I made objects from these classes (skipping the factory) as follows:
Dim CustQuery As New clsws_CustomerQuery
Dim Query_Input As New struct_AniDnis
Dim Query_Output As New struct_QueryResult

When I run the code, I get the '438 - Object doesn't support this
property or method' error when I call the method that actually does the
query:

Query_Output = CustQuery.wsm_getDnis(Query_Input)

When I type the dot after CustQuery, it gives me the wsm_getDnis
method, so I know it has this method, and at some level VBA knows it
has this method. Just not at runtime, for some reason.

The wsm_getDnis method is defined in the generated
clsws_CustomerQueryclass module as follows:

Public Function wsm_getDnis(ByVal obj_requestInfo As
struct_AniDnis) As struct_QueryResult

I wonder if perhaps I am passing the Query_Input value incorrectly, due
to my lack of VBA experience.

Thanks much,
Tim

(the following is the entire method I wrote)
==================================================
Private Sub Execute_Query_Click()

Dim CustQuery As New clsws_CustomerQuery
Dim Query_Input As New struct_AniDnis
Dim Query_Output As New struct_QueryResult

Query_Input.Ani = "5612186545"
Query_Input.DestNumber = "5615426969"
Query_Output.Result = 0
Query_Output.Dnis = "NORESULT"
Query_Output.Pin = "NORESULT"

'grab values from spreadsheet
If Not IsEmpty("B3") Then
Query_Input.Ani = Val(Range("B3").Text)
If Not IsEmpty("B4") Then
Query_Input.DestNumber = Val(Range("B4").Text)
End If
End If

' Execute query
Query_Output = CustQuery.wsm_getDnis(Query_Input)

Range("B7").Value = Query_Output.Result
Range("B8").Value = Query_Output.Dnis
Range("B9").Value = Query_Output.Pin
End Sub
==================================================

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
"Object doesn't support this property or method" in Excel 2003 rhiski12 Excel Discussion (Misc queries) 3 November 24th 08 03:58 PM
VBA error: "object doesn't support this property or method" Dave F Excel Discussion (Misc queries) 2 April 23rd 07 06:04 PM
Why "object doesn't suppor this property or method"? davegb Excel Programming 5 September 2nd 05 11:01 PM
Object doesn't support this property or method davegb Excel Programming 11 May 12th 05 03:36 PM
"Select Column method or property not available because some/all of object doesn't refer to table" Steven Rosenberg Excel Programming 0 August 18th 03 04:41 AM


All times are GMT +1. The time now is 09:26 AM.

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

About Us

"It's about Microsoft Excel"