Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Image control
Have code which loads a gif file to an image control. If I have a breakpoint
in the code the gif file loads beatuifully to the image sized as it should be. If i do not have a breakpoint it appears to size somewhat at its own will. Any suggestions why this could be? Code below. n = ActiveSheet.ChartObjects.Count ActiveSheet.ChartObjects(n).Height = Image1.Height '300 ActiveSheet.ChartObjects(n).Width = Image1.Width '320 .PlotArea.Left = 20 .PlotArea.Top = 15 .PlotArea.Height = Image1.Height - 30 '160 .PlotArea.Width = Image1.Width - 25 '300 If obXY.Value Then .Axes(xlCategory).AxisTitle.Top = Image1.Height If .Axes(xlValue, xlPrimary).HasTitle = True Then ..Axes(xlValue).AxisTitle.Left = 1 If .HasTitle = True Then .ChartTitle.Top = 3 End With Set CurrentChart = ActiveSheet.ChartObjects(n).Chart '''Save chart as GIF FName = ThisWorkbook.Path & Application.PathSeparator & "temp.gif" CurrentChart.Export FileName:=FName, FilterName:="GIF" '''Show the chart Image1.Picture = LoadPicture(FName) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Image control
hi,
check the autosize property of the image control. may sure it is set to false. -----Original Message----- Have code which loads a gif file to an image control. If I have a breakpoint in the code the gif file loads beatuifully to the image sized as it should be. If i do not have a breakpoint it appears to size somewhat at its own will. Any suggestions why this could be? Code below. n = ActiveSheet.ChartObjects.Count ActiveSheet.ChartObjects(n).Height = Image1.Height '300 ActiveSheet.ChartObjects(n).Width = Image1.Width '320 .PlotArea.Left = 20 .PlotArea.Top = 15 .PlotArea.Height = Image1.Height - 30 '160 .PlotArea.Width = Image1.Width - 25 '300 If obXY.Value Then .Axes(xlCategory).AxisTitle.Top = Image1.Height If .Axes(xlValue, xlPrimary).HasTitle = True Then ..Axes(xlValue).AxisTitle.Left = 1 If .HasTitle = True Then .ChartTitle.Top = 3 End With Set CurrentChart = ActiveSheet.ChartObjects(n).Chart '''Save chart as GIF FName = ThisWorkbook.Path & Application.PathSeparator & "temp.gif" CurrentChart.Export FileName:=FName, FilterName:="GIF" '''Show the chart Image1.Picture = LoadPicture(FName) . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Image control
It is set to false.
"Frank Stone" wrote: hi, check the autosize property of the image control. may sure it is set to false. -----Original Message----- Have code which loads a gif file to an image control. If I have a breakpoint in the code the gif file loads beatuifully to the image sized as it should be. If i do not have a breakpoint it appears to size somewhat at its own will. Any suggestions why this could be? Code below. n = ActiveSheet.ChartObjects.Count ActiveSheet.ChartObjects(n).Height = Image1.Height '300 ActiveSheet.ChartObjects(n).Width = Image1.Width '320 .PlotArea.Left = 20 .PlotArea.Top = 15 .PlotArea.Height = Image1.Height - 30 '160 .PlotArea.Width = Image1.Width - 25 '300 If obXY.Value Then .Axes(xlCategory).AxisTitle.Top = Image1.Height If .Axes(xlValue, xlPrimary).HasTitle = True Then ..Axes(xlValue).AxisTitle.Left = 1 If .HasTitle = True Then .ChartTitle.Top = 3 End With Set CurrentChart = ActiveSheet.ChartObjects(n).Chart '''Save chart as GIF FName = ThisWorkbook.Path & Application.PathSeparator & "temp.gif" CurrentChart.Export FileName:=FName, FilterName:="GIF" '''Show the chart Image1.Picture = LoadPicture(FName) . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trouble with Image Control on a worksheet | Excel Worksheet Functions | |||
image edit control | Excel Programming | |||
Displaying a Tif image in the Image Control | Excel Programming | |||
copy shape image into image control | Excel Programming | |||
use standard icon in image control | Excel Programming |