Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating Excel Charts using VBA


Hi All,
I wanted to use VB code to create a excel file and then based on som
data present in the excel sheet, I want to create a chart on the shee
which will have the data as source.

I am able to create the excel file dynamically and load a few cell
with the data. But, I am stuck up with the graphical part of it. Ca
anyone let me know how to create charts dynamically and give some cell
as the data source for the chart?

Thanks,
Samee

--
sameerc
-----------------------------------------------------------------------
sameerce's Profile: http://www.excelforum.com/member.php...nfo&userid=807
View this thread: http://www.excelforum.com/showthread.php?threadid=31425

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Creating Excel Charts using VBA

I have in my harddisk a file basesd on similar critera of yours this
customised for me. you can chang to suit your needs This is based on
knoweldge culled from Jon Peltier and Tushar metha web pages.

I have some columnar data from A1. I insert a name <rv with refernce to as

=OFFSET(Sheet1!$A$1,0,0,COUNT(Sheet1!$A:$A),1)

the name refeence is given such that the columnar data is dyanamic.
for experiment you ener some data A1 to A10 and name it like above when you
add data in the same column the name takes that into account.

then II ahve a vba code.open sheet2 and runthe code

Public Sub test()
Application.Goto Reference:="rv"
Charts.Add
ActiveChart.ChartType = xlBarStacked

'ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"
ActiveChart.Location Whe=xlLocationAsObject, Name:="sheet2"
End Sub
see whther you can modify this to suit your needs
the chart is embedded in sheet2

may NOT be very elegant solution.
sameerce wrote in message
...

Hi All,
I wanted to use VB code to create a excel file and then based on some
data present in the excel sheet, I want to create a chart on the sheet
which will have the data as source.

I am able to create the excel file dynamically and load a few cells
with the data. But, I am stuck up with the graphical part of it. Can
anyone let me know how to create charts dynamically and give some cells
as the data source for the chart?

Thanks,
Sameer


--
sameerce
------------------------------------------------------------------------
sameerce's Profile:

http://www.excelforum.com/member.php...fo&userid=8071
View this thread: http://www.excelforum.com/showthread...hreadid=314254



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
Creating Multiple Pie Charts from Excel Sheet geezey Charts and Charting in Excel 1 September 5th 08 03:37 AM
Creating custom charts in Excel 2007 glitterbug99 Charts and Charting in Excel 3 November 1st 07 02:39 PM
Creating Multiple Excel Charts houstonguy Charts and Charting in Excel 1 February 10th 07 04:57 PM
Creating charts in Excel... [email protected] Excel Discussion (Misc queries) 1 July 2nd 06 06:42 AM
Creating Charts in Excel 2002 (XP) Greg Koppel Excel Programming 0 May 26th 04 11:25 PM


All times are GMT +1. The time now is 08:40 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"