Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
EARN,20000$ & ALL TYPES SOFTWARE FREE DOWNLOAD,& KATRINA KAIF OPENVIDEOS & WEBSITE DEV TO FREE ALL OVER THE WORLD`S PEOPLE | Excel Worksheet Functions | |||
Free social world wide network pays for 10 generations! Free! | Excel Discussion (Misc queries) | |||
Where free 2 sigma statistical process control chart, free? | Charts and Charting in Excel | |||
Floating row? | Excel Discussion (Misc queries) | |||
Free books on Charting, Basics, Data Management, Functions; Free Add-In "Excel Usability Enhancer" | Excel Programming |