home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_02 / 1n02065a < prev    next >
Text File  |  1990-07-09  |  997b  |  28 lines

  1.  
  2.      #Launch
  3.      run excel.exe
  4.  
  5.      #LOGiiX
  6.      function Main()
  7.      {DDE Commands}
  8.      begin
  9.         channel:=DDEInitiate("excel","emps"); {Set up DDE link}
  10.         if(channel=0)then
  11.             begin
  12.               messagebox("Error initiating DDE link"); {Couldn't open channel - No Excel?}
  13.             end
  14.         else
  15.             begin
  16.               messagebox("Storing a name in the spreadsheet.");
  17.               DDEPoke(channel,"r1c1","Karen Watterson"); {Giving data to Excel}
  18.               messagebox("Getting the name back.");
  19.               Employee_Name := DDERequest(channel,"r1c1"); {Requesting data from Excel}
  20.               messagebox("Asking Excel to beep.");
  21.               DDEExecute(channel,"[beep()]"); {Telling Excel to execute command}
  22.               messagebox("Closing the DDE link.");
  23.               DDETerminate(channel); {Close down link}
  24.               messagebox("Employee = ",Employee_Name); {Show data received}
  25.             end;
  26.      end
  27.  
  28.