+ Reply to Thread
Results 1 to 2 of 2

Object not set error - excel 2007

Hybrid View

bnath001 Object not set error - excel... 06-03-2009, 06:58 PM
shg Re: Object not set error -... 06-03-2009, 09:05 PM
  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    ca
    MS-Off Ver
    Excel 2003
    Posts
    2

    Unhappy Object not set error - excel 2007

    I have some VBA code that calls a webservice to get some data.

    I have also installed Microsoft office soap type library on the machine.

    I get "Object not set" error on the following line:
    webServiceRequest.TimePeriod.TimeSlot = inputTimeSlot

    Not sure what to do. I appreciate some advise/help.

    Sub ImportMarketData()

    Dim marketDataService As New clsws_FHLBSFCurveService
    Dim webServiceRequest As struct_FHLBSFCurveRequest
    Dim inputDate As String
    Dim inputTimeSlot As String

    inputDate = InputBox(Prompt:="Market-Data Date:", _
    Title:="Market-Data Date", Default:="12/31/2006")

    inputTimeSlot = InputBox(Prompt:="Market-Data TimeSlot:", _
    Title:="Market-Data TimeSlot", Default:="EndOfMonth")

    webServiceRequest.TimePeriod.TimeSlot = inputTimeSlot
    webServiceRequest.TimePeriod.TimeStamp = DateValue(inputDate)

    webServiceRequest.CurveClassName = "DNCOCurve"
    Set curveResponse = marketDataService.wsm_GetCurve(webServiceRequest)

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Object not set error - excel 2007

    Welcome to the forum, bnath.

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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