Solved

Excel Macros via DDE

Posted on 1999-01-27
4
519 Views
Last Modified: 2012-05-04
Can anyone shed some light on the CREATE.OBJECT macro available in Excel, I'm building my spreadsheet programmatically from Delphi via DDE and can't seem to add any option buttons using the CREATE.OBJECT macro detailed in the XLMACR8.HLP file.  Basically, I'd like 3 options and clicking on each of the items puts a specific value in a specific cell, ie. value 20 if option 1 clicked, value 40 if option 2 clicked and value 98 if option 3 clicked.
0
Comment
Question by:Dazza051197
  • 4
4 Comments
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi Dazza,

You could start here a for an overview of DDE and Excel
http://inet.uni-c.dk/~chlor/ndde/netdde.htm#clientxl
there is even a litle Delphi example,

here is an example how to start a DDE session, getting an object
http://premium.microsoft.com/msdn/library/conf/html/sa3dc.htm
 
and take a look here on how to run a macro in an Excel sheet.
http://premium.microsoft.com/msdn/library/officedev/office/output/f1/d4/s5a9b6.htm

an overview and sort of comparison of DDE and OLE
http://premium.microsoft.com/msdn/library/officedev/project/project/pssvba/mod3les4.htm

I would always choose for an OLE Automation solution, especially when you working with another language then one of the VB dialects. OLE or COM is a little more in depth stuff but when it does what you want it to do (automation is a simple application of COM) it's easy and flexible.

A good starting point on OLE Automation from Delphi you can find here
http://www.inprise.com/delphi/papers/microexcel/
It's not good but excellent, from simple automation to very complex structures.

Hope this will give you a start, enjoy and learn,
:O)Always happY.



0
 
LVL 44

Accepted Solution

by:
bruintje earned 100 total points
Comment Utility
Hi Dazza,

You could start here a for an overview of DDE and Excel
http://inet.uni-c.dk/~chlor/ndde/netdde.htm#clientxl
there is even a litle Delphi example,

here is an example how to start a DDE session, getting an object
http://premium.microsoft.com/msdn/library/conf/html/sa3dc.htm
 
and take a look here on how to run a macro in an Excel sheet.
http://premium.microsoft.com/msdn/library/officedev/office/output/f1/d4/s5a9b6.htm

an overview and sort of comparison of DDE and OLE
http://premium.microsoft.com/msdn/library/officedev/project/project/pssvba/mod3les4.htm

I would always choose for an OLE Automation solution, especially when you working with another language then one of the VB dialects. OLE or COM is a little more in depth stuff but when it does what you want it to do (automation is a simple application of COM) it's easy and flexible.

A good starting point on OLE Automation from Delphi you can find here
http://www.inprise.com/delphi/papers/microexcel/
It's not good but excellent, from simple automation to very complex structures.

Hope this will give you a start, enjoy and learn,
:O)Always happY.



0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
WOW! same minute.
Oke if you have any questions I'll be glad to help.
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi Dazza,

Did it do any good?
:O)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now