Solved

Excel Macros via DDE

Posted on 1999-01-27
4
526 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

To Patch or not to Patch? That is the question!

Don't get caught out like thousands of others around the world in the recent Ransomware Fiasco!
Discuss..
- Why it's not a good idea to wait before Patching
- Sensible approaches to Patching discussed
- Add your feedback, comments and suggestions

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
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…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

738 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