The Datastream Event Study Matching Tool – Run-time Error ‘1004’

When you use the Datastream Event Study Matching Tool, you can get the error message “Run-time error ‘1004’: Application-defined or object-defined error’. When you click the button Debug you’ll see there is ‘something’ wrong with the dates (but what?).

1004

From what we have seen this error message appears when there is no data or not enough data for a particular company in the requested window, often because the base date of the serie in Datastream is after the event date entered in the tool.

You can solve this by deleting that particular event from your list of events and running the tool again. This can be very time consuming and you have to check for other events as well.

You can also do this: leave all events in your list, but before hitting the button Process Table in the tool, in the sheet REQUEST_TABLE, click the button Options and enter something in the box No data string (for example NA). Datastream will put NA in cells without data, and the macro in the Event Study Matching Tool will return NA’s in the output of the tool. This allows the macro to run with (hopefully) not run-time errors and you can easily find the events you have to delete in the output.

no data string

na in output

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s