The information in this article applies to:
SUMMARY
In Microsoft Query, there are two available dynamic data exchange (DDE)
request items that are not documented. The TierType request item and the
FileExt request item are both available on the system channel.
MORE INFORMATION
The following describes TierType and FileExt and the information returned
by each item:
This item returns the type of the specified data source. If no source is specified, the default data source type is returned. If no source is specified, and there is no source currently connected, Microsoft Query tries to connect to that source. Return values are:FileExt[/source]: For single tier data sources, this item returns the file extension for the specified data source. As with TierType, if no source is specified, the file extension for the default data source is returned. If no source is specified, and there is no source that is currently logged on, Microsoft Query tries to connect to that source.For example, if you request the FileExt item and you specify a dBASE data source, the value "dbf" is returned. If you specify a Text data source, both the values "txt" and "csv" are returned. Note that the FileExt request item only returns a value for a single tier type data source (not 1.5 tiers). Visual Basic ExampleIn the following example, the TierType request item is assigned to the variable tier_type, and returns the value 1 in a message box. The FileExt request item is assigned to the variable file_ext and returns the value dbf in cell A1 on Sheet1 in the active workbook. Note that Microsoft Query must be running, or the Microsoft Query directory must be listed in the path statement in your AUTOEXEC.BAT file to avoid receiving an error message when you run the following procedure.Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft Support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.
REFERENCESMicrosoft Query 97For more information about using DDE with Microsoft Query 97, click the Index tab in Microsoft Excel Help, type the following textddeand then double-click the selected text to go to the "Use Dynamic Data Exchange (DDE) with Microsoft Query" topic. Microsoft Query 1.0 and 2.0"Microsoft Query User's Guide," Chapter 9, "Using Dynamic Data Exchange with Microsoft Query"For more information about a specific DDE command to use with Microsoft Query 1.0 and 2.0, click Contents on the Help menu and click the topic DDE Commands. Additional query words: 5.00 5.00c 7.00 7.00a 8.0 8.00
Keywords : kbinterop xlvbainfo xlquery |
Last Reviewed: October 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |