Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-08-2009
Member
 
Join Date: Jul 2009
Posts: 49
How to Display bar graph from with VBA

Hi friends,

I am having some data in VBA which i would like to display in a bar graph. Does anyone know how to display bar graph from data in access table with VBA and at the same time i also want to have a control on columns to display with combo box. I have also asked my friend and at the same time try to find it over internet but was not able to get any solution. Can anyone provide me any code for the same.
Reply With Quote
  #2  
Old 31-08-2009
Member
 
Join Date: Dec 2008
Posts: 152
How to Display bar graph from with VBA

If you want to display bar graph in VBA then according to me MSGraph is a psrt of Office, then it's very simple in that case you nee to create a blank form and then insert a chart, over here you will get a wizard which will take you through the steps. Select the table or query, pick which fields, the type of chart, and then set which field for each axis and grouping etc.
Reply With Quote
  #3  
Old 31-08-2009
Member
 
Join Date: Jul 2009
Posts: 49
How to Display bar graph from with VBA

Thanks for replying as you have said i have try to follow the steps but over here i am only able to create the graph with data from the table, but now i would like to add controls like Combo box, list with specific columns to take and also date range, so that the user can choose the data that he wants. Does anyone know what code is to be used for the same.
Reply With Quote
  #4  
Old 31-08-2009
Member
 
Join Date: Jan 2009
Posts: 110
Display bar graph from data in access table with VBA

If you really want that user can manipulate the chart then you need to add Microsoft Graph Objects Library to your references. For that you need to click on References under the tools menu from the VBA window and in the code create variables, a graph.application and a graph.chart. Use the set statement to assign the variables.


Code:
Dim iGraph As Graph.Application
Dim iChart As Graph.chart

SET iGraph = Me.Graph1.Object.Application
SET iChart = iGraph.Chart
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to Display bar graph from with VBA"
Thread Thread Starter Forum Replies Last Post
When is a line graph used? Bohnieta Off Topic Chat 4 02-01-2012 10:44 PM
PHP 3d ring graph omega4enigma Software Development 3 27-08-2010 08:33 PM
Retrieve many paths on a graph ASHER Software Development 6 05-01-2010 02:18 PM
Graph paper creator Deep23 Windows Software 3 09-06-2009 06:07 PM
PCI-E x 16 and the graph and its future PAPRIKA Motherboard Processor & RAM 3 23-02-2009 01:16 PM


All times are GMT +5.5. The time now is 11:59 PM.