Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default XL Free Floating

Hi,

With Excel VBA one is able to set the placement of a chart = xlfreefloating
so that it is size is not affected by for example increasing the column
size under the chart.

I would like to do the same thing programmatically using VB .NET VS 2003 in
an excel addin application - but I cannot get it to work. Does any one have
an example how to do this in VB .NET or any example sites I could visit
which give good examples of making complex charts with VB .NET it would be
much appreciated.

Thank you for any assistance.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default XL Free Floating

Hi

Here is the code snippet which will draw a chart based on the range(a1:a21)
which will have the xlfreefloating style as we do in VBA.
Public Sub Test()
applicationObject.Charts.Add()
applicationObject.ActiveChart.ChartType =
Excel.XlChartType.xlXYScatter

applicationObject.ActiveChart.SetSourceData(applic ationObject.Sheets("Sheet1
").Range("A1:A21"), Excel.XlRowCol.xlColumns)


applicationObject.ActiveChart.Location(Excel.XlCha rtLocation.xlLocationAsObj
ect, Name:="Sheet1")
With applicationObject.ActiveChart
.HasTitle = False
End With
applicationObject.Worksheets("Sheet1").ChartObject s(1).Placement =
Excel.XlPlacement.xlFreeFloating
End Sub

I think a better approach is to record the macro in the excel, and we will
get the vba code.
And it is easy to turn the vba code into vb.net code.

If you still have any concern, please feel free to post here.

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

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
EARN,20000$ & ALL TYPES SOFTWARE FREE DOWNLOAD,& KATRINA KAIF OPENVIDEOS & WEBSITE DEV TO FREE ALL OVER THE WORLD`S PEOPLE SAI BABA Excel Worksheet Functions 0 January 25th 09 01:10 PM
Free social world wide network pays for 10 generations! Free! alabatros1 Excel Discussion (Misc queries) 0 November 15th 08 09:52 PM
Where free 2 sigma statistical process control chart, free? Blankenh Charts and Charting in Excel 0 January 16th 08 10:28 PM
Floating row? pause café Excel Discussion (Misc queries) 2 January 24th 07 11:47 PM
Free books on Charting, Basics, Data Management, Functions; Free Add-In "Excel Usability Enhancer" VJ[_3_] Excel Programming 0 December 11th 03 09:01 AM


All times are GMT +1. The time now is 09:54 AM.

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"