Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 excel / access desktop app, drawing graphs
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 09 February 2004 :  11:46:43  Show Profile
Hi

I am trying to build a desktop application that will auto-generate graphs for us, based on the table below.

The figures relate to usage levels per part. There are about 8000 rows, and i require a graph for each ROW !
The title of the graph is the part number, the first line on the graph is the usage per period, and the second line is the average usage. the x-axis labels is 'period n', per column.

PartID	       Description 	Period 10	Period 11	Period 12     AverageUsage 
00100019	SCREW		0.05	               0	0	          0.00625
00200010	NAIL		0.05	             0.1	0	        0.01875

how can i build some code/macro/command that can do this ?
i thought about being able to type in the partID to generate the graph, or place a button next to the row which generates a graph for that row.

The raw data comes from the mainframe in .csv format, and then i import that into excel. I also have MSAccess at my disposal.

can anyone help? i am using office xp
Thanks

Edited by - chumbawumba on 09 February 2004 12:06:42

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 09 February 2004 :  12:06:00  Show Profile
to clarify, the AverageUsage should be plotted as a straight
line over all the periods.
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 09 February 2004 :  12:25:52  Show Profile
Here's what I do in order to make automations with Excel:

I go to tools -> macro -> record macro, and do something similar to what I'm trying to do, but with a reduced scope. In your case, for instance, you could create a graphic for three or four rows, instead of 8000.

When the graphic is done, hit on the "stop recording" button.

Afterwards, go to tools -> macro -> Visual basic editor, and inside "module1" look for the macro you have created. You just have to edit the code to widen the rows affected, or use a variable to define them...

I hope this helps a little...

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 09 February 2004 :  13:35:13  Show Profile
Hi Mikel, that does help and infact was the method i have been exploring. unfortunately i cannot get that to work. the difficulty comes from not knowing which row you are in when you click the button. i need a different solution ...
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 10 February 2004 :  03:47:16  Show Profile
Hi, chumbawumba.

Yes, you can know the row. If you place a button next to each cell, you can declare an integer variable for the chosen row. You could get it as iCurrentRow = ActiveCell.row

This is just an option, I guess that you could use more methods to know which row you have chosen (maybe some "SelectedRange" object? I don't know, I haven't got any documentation here).

Once you have got that, you could modify the macro code to create a graph using the variable, one series with the iCurrentRow for the values per period, and another one with iCurrentRow+1 for the average.

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07