var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: chart or spreadsheet on userform
Has anyone figured out how to place a chart or part of a spreadsheet in excell on a userform yet?
I assume you mean a dynamic "live" chart, as opposed to a static chart.
John Walkenbach, Excel 200X PowerProgramming with VBA, pp.463 ff. offers two methods:
Method 1: Save chart as file
1. Create chart
2. Insert a UserForm and add an Image control.
3. Write VBA code to save chart as GIF file, then set Image control's Picture property to the GIF file. Use VBA's LoadPicture function.
Method 2: Use OWC [Office Web Components] Chartspace control
Note: this method does not allow existing charts to be used; rather you have to write code to create the chart.
1. Add Chartspace control to Toolbox. Right-click the toolbox to display additional controls. Put a check next to Microsoft Office Chart 10.0 (for XP, 9.0 for 2000)
2. Add Chartspace control to UserForm as any other control.
3. Create the chart with code.