Read-Only Open: Excel DDE Command
Keywords: DDE Excel Command
Question:
I'm using the folowing commands to open an Excel File through a DDE conversation. How do I change this to specify open as READ-ONLY?--------------------------------------------- channel = DDEInitiate("Excel", "System") result = DDEExecute(channel,[open("temp.xls")]') DDETerminate(channel) ---------------------------------------------Thanks for any help you can give.Answer:
- Try this:
--------------------------------------------- channel = DDEInitiate("Excel", "System") result = DDEExecute(channel,'[open("temp.xls",,TRUE)]') DDETerminate(channel) ---------------------------------------------- I figured it out by grabbing the Excel 4.0 Macro function help file from the microsoft site. The Excel Macro language is 99% the same as the DDE language.
Here's a link to the file on the MS site:
http://support.microsoft.com/download/support/mslfiles/Macrofun.exe
Search for open. The DDE commands are the same as the macro commands. It's the stuff that goes inside the square brackets.
Article ID: W12820Filename: Read-only Excel Open DDE Excel Command.txt