ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I transfer an MSFLEXGRID picture to a worksheet? (https://www.excelbanter.com/excel-programming/406597-how-can-i-transfer-msflexgrid-picture-worksheet.html)

Indinfer

How can I transfer an MSFLEXGRID picture to a worksheet?
 
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?








Jan Karel Pieterse

How can I transfer an MSFLEXGRID picture to a worksheet?
 
Hi Indinfer,

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


Why the flexgrid and not insert a picture directly?

Regards,

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


Indinfer

How can I transfer an MSFLEXGRID picture to a worksheet?
 
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?

"Jan Karel Pieterse" wrote:

Hi Indinfer,

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


Why the flexgrid and not insert a picture directly?

Regards,

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



Jan Karel Pieterse

How can I transfer an MSFLEXGRID picture to a worksheet?
 
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


Indinfer

How can I transfer an MSFLEXGRID picture to a worksheet?
 
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.


"Jan Karel Pieterse" wrote:

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



Jan Karel Pieterse

How can I transfer an MSFLEXGRID picture to a worksheet?
 
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


Terry Harmer

Hi Indinfer,Well, I don't know the flexgrid control, but can't youjust use a
 
take a look at: http://www.andreavb.com/tip070013.html for some sample code that prints the image of a flexgrid.

It's not quite working for me, but it's a start.

-t

On Sunday, February 24, 2008 10:40 PM Indinfe wrote:


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?



On Monday, February 25, 2008 12:14 AM Jan Karel Pieterse wrote:


Hi Indinfer,


Why the flexgrid and not insert a picture directly?

Regards,

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



On Tuesday, February 26, 2008 11:14 PM Indinfe wrote:


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?

"Jan Karel Pieterse" wrote:



On Wednesday, February 27, 2008 7:33 AM Jan Karel Pieterse wrote:


Hi Indinfer,


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



On Sunday, March 02, 2008 9:53 AM Indinfe wrote:


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.


"Jan Karel Pieterse" wrote:



On Monday, March 03, 2008 12:46 AM Jan Karel Pieterse wrote:


Hi Indinfer,


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



Submitted via EggHeadCafe
SharePoint 2010 Visual Web Parts using Visual Studio 2010, Feature Designer and Package Designer
http://www.eggheadcafe.com/tutorials...-designer.aspx



All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com