scripting....

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
Well, I get tto work today and there is a not one my desk....

"make a script that will make a graph of all the numbers we want in our excel workbook."

That sounds feasible, but there is a porblem, I have no idea how to script. I looked on the web and all i can find is web page scripting. I am teh oinly one in the office today, so this will be a hard task to get help on. Anyoen know any good tutorials for this?
 

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
The first step is finding what you want to use to make the graph. If they want an Excel graph from Excel data, your task is a fairly easy one: just look up excel scripting or excel macros or maybe just vbscript.
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
I want to use data that we have recorded over time. Basically, the data is scattered into about 1,000 sheets in a workbook, but they all share teh same format....
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
Can you import them into Access? Then making a graph would be easy. No real scripting needed.
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
Well, the workbook will be constnatly updated with new results, so I also need to figure out how to tell the script to keep interating through pages until you reach the end. Does the end = null?
 

neit

Senior member
Dec 6, 2001
353
0
0
I did some minimal excel vba stuff for an internship last year. Its pretty simple and somewhat smart in that it will usually know when it is done. But to accomplish your task will be a back and forth with the excel vba help, and I have a rough guidline as to how i would accomplish your goal.

First is to make the graph manually, you don't have to do the whole thing, just for a couple sheets worth of data. This step helps you figure out some logic to it (I alway automate the process, i don't learn the process through automation, does that make sense?)

Then, you want to see how the autographing works. Basically create a button, then go into the scripting, have the button make a graph (again, refer to the vba help) from the data already selected by hand. The goal here is to have the same final result as in the first step.

Finally, figure out the automation path you want for it to select the data. The difficulty really depends on how scattered the data is, and if you have odd naming to your sheets (Ie, "main room", "conference room" instead of "room 1", "room 2").

Again, I was not very advanced on the excel macroing, but a little bit of planning goes a long way in cutting through an unfamiliar task. Hope that helps, and good luck.
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
What i am trying to figure out now (i am cheating, I am using record macro), is how to iterate through the sheets....
 

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
That's only going to iterate it literally through sheet n. I believe you can iterate through all the sheets in the workbook. Are workbooks containers?

VBscript support for containers is terrible, though.