How can I transfer an MSFLEXGRID picture to a worksheet?

I

Indinfer

I see that MSFLEXGRID has a Picture property. From Intellisense, I get:

Dim grid as MSFLEXGRID
grid.Picture


I see in Intellisense that there is an image object which also has a Picture
property:

Dim img as Image
img.Picture


So, I would think I could programmatically put an Image object on a
worksheet using an Add method. Then I can transfer the picture from the
MSFLEXGRID to the image, something like this:

Set img.Picture = grid.Picture

Then, I can printout the worksheet. That is the goal, to print the picture
of the MSFLEXGRID.

So, I do not see how to connect the dots. How do I get from the MSFLEXGRID
picture to the printer?
 
I

Indinfer

I am trying to print the image of the MSFLEXGRID. The MSFLEXGRID control has
text and different cells have different background colors to show data. So, I
need to extract what shows on the MSFLEXGRID and print it out. I also need to
save the image to an Excel worksheet.

Also, I don't see how to programmatically insert the MSFLEXGRID image
directly onto a worksheet. That would be preferable, if I would know a way to
do it.

How can I get the FLEXGRID image onto a worksheet?
 
J

Jan Karel Pieterse

Hi Indinfer,
So, I
need to extract what shows on the MSFLEXGRID and print it out. I also need to
save the image to an Excel worksheet.

Still not sure why you want to use the flexgrid, but anyway, I can't see a way
to print the contents itself. You can print a userform, but that may not be what
you need.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
 
I

Indinfer

I inherited this Excel program which uses MSFLEXGRID. I am supposed to debug
it.

One requirement is to print the MSFLEXGRID image.
The other requirement is to store images on a Worksheet.

You seem to think that the problem is that the program uses MSFLEXGRID.
Please tell me what control to substitute that will give me the same image
capabilities but will allow printing its image and allow storing images on a
worksheet.
 
J

Jan Karel Pieterse

Hi Indinfer,
You seem to think that the problem is that the program uses MSFLEXGRID.
Please tell me what control to substitute that will give me the same image
capabilities but will allow printing its image and allow storing images on a
worksheet.

Well, I don't know the flexgrid control, but can't you just use a worksheet to
achieve the behaviour you need? And if this has to go on a userform, see if the
spreadsheet control of the Office web components works for you.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top