Learn how to a build a cloud-first strategyRegister Now


Delphi Code for Excel

Posted on 2011-04-27
Medium Priority
Last Modified: 2013-11-23
I got the following VBA code to solve a problem storing images in Excel:

Dim myPict As Picture

With ActiveCell
Set myPict = .Parent.Pictures.Insert("C:\ron.png")
myPict.Top = .Top
myPict.Left = .Left
End With

How do I do this in Delphi. Specifically how do I declare myPict in Delphi to work with Excel?
Question by:Asent1
1 Comment

Accepted Solution

huacat earned 2000 total points
ID: 35476523
Please declare myPict as OleVariant;
  mypict: OleVariant;

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

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