Article ID: 107745
Article Last Modified on 6/23/2005
Sub dde()
chanNum = DDEInitiate("msquery", "system")
' Use the path for your query file for the following:
' Note: query files in Excel 97 contains a dqy extension.
DDEExecute chanNum, "[open('c:\excel\query1.qry')]"
nRows = DDERequest(chanNum, "NumRows")
nCols = DDERequest(chanNum, "NumCols")
DDEExecute chanNum, "[fetch.advise('Excel','sheet1','r1c1:r" & _
nRows(LBound(nRows)) & "c" & nCols(LBound(nCols)) & "','all')]"
End Sub
NOTE: You will need to create a query file to run this macro if you
don't already have one. Use the path for this file in line 2 of the
macro.)
Additional query words: 8.00 97 XL
Keywords: kbprogramming KB107745