LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Querytables.add with sql query text stored in separate text fi

I checked my Excel VBA References and 4 references automatically are included
on all computers I've worked with

Visual Basic for Applications
Microsoft Excel 11.0 Object Library
OLE Automation
Microsoft Office 11.0 Object Library

I've seen problems when these libraries where no pointing to the correct DLL
file. Usually this happens when you upgrade from one verion of Office to
another or from XP to Vista. I also have seen this problem when you use

"StuartBisset" wrote:



Hi Joel

Thanks for your prompt reply. Do I need to tick a reference library
(Tools References in the VBE) to use the code I've quoted below as
OpenTextFile, ReadFile, ForReading and TristateTrue are not recognised
methods/properties in my VBE?

Set fs = CreateObject("Scripting.FileSystemObject")
Set fin = fs.OpenTextFile(ReadFile, _
ForReading, TristateTrue)


Kind regards

Stuart

 
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
QueryTables.Add() not returning text from SQL Express table D. Leger Excel Programming 1 November 7th 08 12:11 PM
Functions, Arrays and number/text stored as text pepenacho Excel Worksheet Functions 3 April 23rd 08 08:02 PM
I open a CSV file with excel, but the text is separate with comma! August Excel Discussion (Misc queries) 3 March 22nd 07 11:02 AM
Ascii iinput file - separate text from Numbers [email protected] Excel Worksheet Functions 3 August 29th 06 02:46 PM
Make Table Query into Text File XP Excel Programming 0 September 14th 05 03:38 PM


All times are GMT +1. The time now is 08:13 AM.

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

About Us

"It's about Microsoft Excel"