Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


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:

  1. Try this:
    
    	---------------------------------------------
    	channel = DDEInitiate("Excel", "System")
    
    	result = DDEExecute(channel,'[open("temp.xls",,TRUE)]')
    
    	DDETerminate(channel)
    	---------------------------------------------
    
  2. 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:   W12820
Filename:   Read-only Excel Open DDE Excel Command.txt