Solved

Excel Macros via DDE

Posted on 1999-01-27
4
520 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
ID: 1616028
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
ID: 1616029
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
ID: 1616030
WOW! same minute.
Oke if you have any questions I'll be glad to help.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1616031
Hi Dazza,

Did it do any good?
:O)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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:
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

864 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

19 Experts available now in Live!

Get 1:1 Help Now