Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with Image Control on a worksheet MChrist Excel Worksheet Functions 0 August 19th 05 01:18 PM
image edit control JT[_2_] Excel Programming 0 September 21st 04 11:25 PM
Displaying a Tif image in the Image Control Neil Excel Programming 1 September 21st 04 12:56 AM
copy shape image into image control Luc Benninger Excel Programming 2 July 15th 04 11:14 AM
use standard icon in image control John A Grandy Excel Programming 3 July 28th 03 09:51 AM


All times are GMT +1. The time now is 05:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"