Delphi Code for Excel

Posted on 2011-04-27
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
    LVL 6

    Accepted Solution

    Please declare myPict as OleVariant;
      mypict: OleVariant;

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

    734 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

    22 Experts available now in Live!

    Get 1:1 Help Now