WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DDE

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:01:25:15:20:08
Last Updated: 2001:01:25:15:20:08