Solved

embed a VC6 application in an EXCEL spreadsheet cell

Posted on 2011-09-26
5
503 Views
Last Modified: 2012-05-12
I am using EXCEL 2003.   In my spreadhseet, I have a macro that launches a VC6.0 application (via a button click in on of my spreadsheet cells, that calls the Shell(AppName.exe....) function.
 
So, my VC6 app displays on top of my spreadsheet.  This is fine.  

But, what I'd really like to do is to embed my VC6 app within one of the spreadsheet cells.   By doing so, I think my spreadsheet will look more polished, as the VC6 app will look "contained" within a cell, instead of just sitting on top of the spreadsheet.

Any thoughts on how to accomplish this would be greatly appreciated.



0
Comment
Question by:cjm20
  • 2
  • 2
5 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
Comment Utility
You cannot embed objects within Excel cells - they will always sit in the drawing layer above the sheet.

Regards,
Rory
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Hello,

if you "embed" the VC6 app in a cell, how do you want to launch it? When the cell gets selected?

You could use a Worksheet Selection_Change event for that.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then

' launch VC6 app

End If

End Sub

Open in new window


cheers, teylyn
0
 

Author Comment

by:cjm20
Comment Utility
If my VC6 app was embedded, I could either continue to laucnh it via the button click macro I have in my VBA code, or in a macro that fires when the worksheet is made active.  Either way though, i'd want the VC6 app to be within the borders of a cell (such that the app couldn't be dragged out of the cell, nor would the app extend beyond the cell boundries if the EXCEL worksheet was resized.
0
 
LVL 50

Assisted Solution

by:teylyn
teylyn earned 250 total points
Comment Utility
Ah, I see what you mean. As rorya said above, Excel does not work that way. Cells can only hold formulas or values.
0
 

Author Comment

by:cjm20
Comment Utility
Well, it seems unanimous then.  it can't be done.  It was worth a shot.  :)

I want to split the points to both of you for trying.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

772 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

11 Experts available now in Live!

Get 1:1 Help Now