1

In an Excel VBA project, I need to read and write UTF-8-encoded text files. After reading this and this SO topic, I am considering using ADO stream objects to accomplish this.

The project is going to be distributed to a public user base. I don't know the number of installations, but judging from the download rates after updates, it must be around 1000 or so.

  1. Is it safe to assume that the VBA command CreateObject("ADODB.Stream") works on every Windows 2000-Windows 7 computer?

  2. Is the availability of the ADO stream object or its functionality in my VBA project dependent on the users' security or other settings?

If there is a risk that users will experience runtime errors due to the ADODB.Stream obejct in the new version of my project, I would rather not want to use it.

Community
  • 1
  • 1
bovender
  • 1,838
  • 15
  • 31

1 Answers1

2

The Stream object was added in ADO v2.5 which is installed as part of Win 2000 and Win ME. See Microsoft ADO History and Microsoft Data Access Components Installation. So I would say yes, it's safe to assume it works on all Windows 2000 - Windows 7 computers. As far as I'm aware, the stream object is not any more dependent on users' settings than the VBA project itself is.

If there is a risk that users will experience runtime errors due to the ADODB.Stream obejct...

There is always a risk that users will experience runtime errors. How high the risk is depends on how good your error handling is. You can reduce the risk by adding code that checks which version of ADO is installed and\or checks that the object is created correctly.

mischab1
  • 1,581
  • 12
  • 17