Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The
form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
See code at Stephen Bullen's site:
htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
Cheers but it has not quite covered what I'm looking for, unless I'm
missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
No, but he is copying the chartobject as a picture into the clipboard. That
is where you jump in. You copy your picture to the clipboard (using code) and then use his code to get it on the userform -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers but it has not quite covered what I'm looking for, unless I'm missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
Cheers again Tom but getting pictures to the form is a side issue. The issue
is addressing the pictures. How do I reference it? I can't find the container object that holds the picture. The chartobject does not seem to work. And without something to point to there is nothing to put in the Form. "Tom Ogilvy" wrote: No, but he is copying the chartobject as a picture into the clipboard. That is where you jump in. You copy your picture to the clipboard (using code) and then use his code to get it on the userform -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers but it has not quite covered what I'm looking for, unless I'm missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
All objects on the worksheet are in the shapes collection.
A hidden collection is the pictures collection. This also includes ActiveX controls as well I believe, but that may not be an issue. dim shp as Shape for each shp in activesheet.shapes msgbox shp.name Next Dim pic as Picture for each pic in activesheet.Pictures msgbox pic.name Next The accomplishment Stephen was documenting was getting the pictures on the userform from a worksheet. Identifying the objects on the worksheet is directly supported. Once identified, the copy method can be used to put them in the clipboard. -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers again Tom but getting pictures to the form is a side issue. The issue is addressing the pictures. How do I reference it? I can't find the container object that holds the picture. The chartobject does not seem to work. And without something to point to there is nothing to put in the Form. "Tom Ogilvy" wrote: No, but he is copying the chartobject as a picture into the clipboard. That is where you jump in. You copy your picture to the clipboard (using code) and then use his code to get it on the userform -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers but it has not quite covered what I'm looking for, unless I'm missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
Thanks, I didn't think that hidden members were usable so never looked. It
claims that they are hidden as they only exist for backward compatability. I assume therefore that Excel 2K3 store pictures differently? Do you know if there is any way of writing this to be forward compatible as I told this office is going to upgrade soon. Thanks, again, for your help. Sorry I wasn't more clear with my question. "Tom Ogilvy" wrote: All objects on the worksheet are in the shapes collection. A hidden collection is the pictures collection. This also includes ActiveX controls as well I believe, but that may not be an issue. dim shp as Shape for each shp in activesheet.shapes msgbox shp.name Next Dim pic as Picture for each pic in activesheet.Pictures msgbox pic.name Next The accomplishment Stephen was documenting was getting the pictures on the userform from a worksheet. Identifying the objects on the worksheet is directly supported. Once identified, the copy method can be used to put them in the clipboard. -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers again Tom but getting pictures to the form is a side issue. The issue is addressing the pictures. How do I reference it? I can't find the container object that holds the picture. The chartobject does not seem to work. And without something to point to there is nothing to put in the Form. "Tom Ogilvy" wrote: No, but he is copying the chartobject as a picture into the clipboard. That is where you jump in. You copy your picture to the clipboard (using code) and then use his code to get it on the userform -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers but it has not quite covered what I'm looking for, unless I'm missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures in Spreadsheet
The pictures collection has been hidden since xl97. It is still here, so
there is no reason to believe it is going to go away. But you can also use the shapes collection which isn't hidden if the picture collection makes you uncomfortable. ? activesheet.Shapes(1).name Picture 1 ? activesheet.Shapes(1).type = msoPicture True -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Thanks, I didn't think that hidden members were usable so never looked. It claims that they are hidden as they only exist for backward compatability. I assume therefore that Excel 2K3 store pictures differently? Do you know if there is any way of writing this to be forward compatible as I told this office is going to upgrade soon. Thanks, again, for your help. Sorry I wasn't more clear with my question. "Tom Ogilvy" wrote: All objects on the worksheet are in the shapes collection. A hidden collection is the pictures collection. This also includes ActiveX controls as well I believe, but that may not be an issue. dim shp as Shape for each shp in activesheet.shapes msgbox shp.name Next Dim pic as Picture for each pic in activesheet.Pictures msgbox pic.name Next The accomplishment Stephen was documenting was getting the pictures on the userform from a worksheet. Identifying the objects on the worksheet is directly supported. Once identified, the copy method can be used to put them in the clipboard. -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers again Tom but getting pictures to the form is a side issue. The issue is addressing the pictures. How do I reference it? I can't find the container object that holds the picture. The chartobject does not seem to work. And without something to point to there is nothing to put in the Form. "Tom Ogilvy" wrote: No, but he is copying the chartobject as a picture into the clipboard. That is where you jump in. You copy your picture to the clipboard (using code) and then use his code to get it on the userform -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... Cheers but it has not quite covered what I'm looking for, unless I'm missreading it. first: does the chatrobject contain any pasted pictures on the sheet? second: if not where are they? In the meantime I'll see if I can get the chartobject thing to work. Thanks, 's a good site that one. "Tom Ogilvy" wrote: See code at Stephen Bullen's site: htttp://www.oaltd.co.uk/Excel/Default.htm See PastePicture.zip about 2/3rds the way down the page -- Regards, Tom Ogilvy "YegaDoyai" wrote in message ... I'm trying to veiw pictures that are in the spreadsheet in a VB Form. The form works ok but as the pictures were cut and pasted I can't seem to fidn the object/collection that contains them. Any help would be appreciatied. PS Saving the pictures seperately is a last resort and I don't want to have to do that as someone is BOUND to delete the pictures by accident. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking pictures to spreadsheet | Excel Worksheet Functions | |||
Inserting Pictures onto a spreadsheet. | Links and Linking in Excel | |||
imbed pictures into a spreadsheet | Excel Discussion (Misc queries) | |||
How can I elminate pictures from spreadsheet | Excel Discussion (Misc queries) | |||
Delete pictures in spreadsheet | Excel Discussion (Misc queries) |