Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We have 20 workbooks, all of which have a background picture for
Sheet1. The problem is that we get *tiling* for any resolution different from 1,024 x 768. The obvious solution is to test for the user's screen resolution and import an appropriately sized Gif, which means for say 10 resolutions, 10 gifs ..... times 20 workbooks. Instead, what about inserting a master Gif into a holding worksheet, testing for screen resolution, and resizing it appropriately. But, even if we could do this resizing, the following code which is supposed to then set the background picture, bombs with the error msg "Picture does not have value property" Worksheets("Sheet1").SetBackgroundPicture Worksheets("Sheet4").Pictures("Picture 1") Is there any solution to this ? Or any other way of using one master Gif ? TIA - Charles Jordan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Charles ,
One thing: .SetBackgroundPicture expects a filename as a parameter. If the gif is in a workbook, you can't supply that. You could copy and paste, but then it's not in the background. There is no .Pictures collection, only .OLEObjects and .Shapes, so I don't think you can access the background picture once its there. In terms of tiling, I get it everytime, it just that if the picture matches your window size and you don't scroll right of down, it's not apparent. Maybe the GetSystemMetric API and setting the scrollable area of the worksheet may help. NickHK "Charles Jordan" wrote in message om... We have 20 workbooks, all of which have a background picture for Sheet1. The problem is that we get *tiling* for any resolution different from 1,024 x 768. The obvious solution is to test for the user's screen resolution and import an appropriately sized Gif, which means for say 10 resolutions, 10 gifs ..... times 20 workbooks. Instead, what about inserting a master Gif into a holding worksheet, testing for screen resolution, and resizing it appropriately. But, even if we could do this resizing, the following code which is supposed to then set the background picture, bombs with the error msg "Picture does not have value property" Worksheets("Sheet1").SetBackgroundPicture Worksheets("Sheet4").Pictures("Picture 1") Is there any solution to this ? Or any other way of using one master Gif ? TIA - Charles Jordan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"NickHK" wrote in message ...
Charles , One thing: .SetBackgroundPicture expects a filename as a parameter. If the gif is in a workbook, you can't supply that. You could copy and paste, but then it's not in the background. There is no .Pictures collection, only .OLEObjects and .Shapes, so I don't think you can access the background picture once its there. In terms of tiling, I get it everytime, it just that if the picture matches your window size and you don't scroll right of down, it's not apparent. Maybe the GetSystemMetric API and setting the scrollable area of the worksheet may help. NickHK "Charles Jordan" wrote in message om... We have 20 workbooks, all of which have a background picture for Sheet1. The problem is that we get *tiling* for any resolution different from 1,024 x 768. The obvious solution is to test for the user's screen resolution and import an appropriately sized Gif, which means for say 10 resolutions, 10 gifs ..... times 20 workbooks. Instead, what about inserting a master Gif into a holding worksheet, testing for screen resolution, and resizing it appropriately. But, even if we could do this resizing, the following code which is supposed to then set the background picture, bombs with the error msg "Picture does not have value property" Worksheets("Sheet1").SetBackgroundPicture Worksheets("Sheet4").Pictures("Picture 1") Is there any solution to this ? Or any other way of using one master Gif ? TIA - Charles Jordan NickHK - thanks . Sure there's a solution here somewhere - will keep you posted. Charles |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I believe tiling occurs regardless of screen resolution and/or picture size.
To delete the background picture, set the file name to a blank string. Sub AddBackground() ActiveSheet.SetBackgroundPicture Filename:="C:\My Documents\Test Background.jpg" End Sub Sub DeleteBackground() ActiveSheet.SetBackgroundPicture Filename:="" End Sub How important is it that the picture fit the user's full screen? Can the picture simply be bigger than the screen, so that it appears to "truncate" on monitors that are set to smaller resolutions? In other words, can you use a single picture file (GIF or JPG) that will fit the largest screen resolution used by all users? -- Regards, Bill |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Bill Renaud" wrote in message ...
I believe tiling occurs regardless of screen resolution and/or picture size. To delete the background picture, set the file name to a blank string. Sub AddBackground() ActiveSheet.SetBackgroundPicture Filename:="C:\My Documents\Test Background.jpg" End Sub Sub DeleteBackground() ActiveSheet.SetBackgroundPicture Filename:="" End Sub How important is it that the picture fit the user's full screen? Can the picture simply be bigger than the screen, so that it appears to "truncate" on monitors that are set to smaller resolutions? In other words, can you use a single picture file (GIF or JPG) that will fit the largest screen resolution used by all users? Bill - thanks - We may have to do as you suggest, but the trouble is that each picture contains an image so can't really be truncated without losing some.. I have just posted a query on another approach to the problem, which is to *insert* the picture on the draw layer, then resize it to fill the screen, and then dump it once the initial splash is over.. But how to resize it?? .. Tks Charles |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Resizing cells in a selection without resizing entire sheet | Excel Discussion (Misc queries) | |||
Need to convert point on screen to various screen resolutions | Excel Discussion (Misc queries) | |||
Making GIFs from anything, with optional resizing | Excel Programming | |||
different screen resolutions | Excel Programming | |||
Exporting Charts as GIFs | Excel Programming |