How to access an Image control in an Excel worksheet from another program? 
Author Message
 How to access an Image control in an Excel worksheet from another program?

I have an Access application that is using an Excel worksheet as a template
to be filled in with data from the database for printing and PDF-ing, and
I've run into a problem.

I want to be able to put an image control into the template worksheet and
fill in the image based on information in the database. For example, if
this was a real-estate app, I'd want to be able to put in an image of the
house that the database record refers to.

I understand the mechanics of putting an Image control onto the sheet and
using LoadPicture to load an image into it. The problem is finding the
flippin' image control's object in the Excel object hierarchy!

When I have the template workbook open in Excel and I use the VBA watch
window to go digging around under the ThisWorkbook object, the only place I
can find any instance of the image object is under ActiveSheet. For
example, if my image control were named "imgPict", the object would be
ThisWorkbook.ActiveSheet!imgPict.

Why doesn't the image control's object also appear under
ThisWorkbook.Sheets(1) or ThisWorkbook.Worksheets(1)?

Worse yet, when I open the workbook as an Excel object from within an
Access VBA routine, the image control's object doesn't even appear under
ActiveSheet! Where is it?

Can anybody help me?

   - John Hardin
   Systems Manager
   Sizzling Platter, Inc.
   SIZZLER - RED ROBIN - RUBY RIVER - HOPPERS



Sun, 25 Nov 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Delete a row in Excel worksheet from VB program

2. Enumerating Excel worksheets within Access

3. Exporting Access tbl to Excel - Worksheet Names

4. Access/VBA: Creating New Excel Worksheets?

5. Linked Excel worksheet losing data. Access table OK

6. Save Access report to specific Excel Worksheet

7. Import multiple excel files with inconsistent number of worksheets in each into ACCESS

8. List predefined Excel ranges/worksheets from Access

9. Excel worksheet to Access

10. VBA code to access PasteSpecial -> Excel Worksheet

11. : Accessing Excel Worksheet using ADO

12. Accessing unnamed cell range in Excel worksheet?

 

 
Powered by phpBB® Forum Software