Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Help needed for a VBA novice with excel charting

  Asked By: Claude    Date: Oct 25    Category: MS Office    Views: 1424
  

I have a worksheet with julian day, hour and other meteorological
data as columns. I would like to be able to generate hour Vs met
variable charts for each day using VBA. Can someone advise me as to
how I can go about doing this in VBA? I would like to be able to
store all met variable charts for a given day on one page. I do
realise that putting 6 or 8 charts on page would mean that the
individual chart size would be quite small. The objective is to
obtain a quick look at the data on a daily basis and ensure that
there are no surprises in the data.

Share: 

 

11 Answers Found

 
Answer #1    Answered By: Jamie Williams     Answered On: Oct 25

Is there any particular reason why you want to use VBA for this? Could you give us an example of what your data  looks like?

 
Answer #2    Answered By: Darrell Harvey     Answered On: Oct 25

No particular reason as to why use VBA. People in our group use excel  quite a lot and so I thought it would be a good idea to do it in Excel and VBA. Moreover, this excercise would give me a nice opportunity to begin programming in VBA. And this is one programming environment which is so easily available in most parts of the world.

 
Answer #3    Answered By: Bethany Hughes     Answered On: Oct 25

My suggestion would be just to build charts  from the Excel tools - I can't see why VBA is needed  from your data  structure. Am I missing something?

 
Answer #4    Answered By: Herbert Weaver     Answered On: Oct 25

Well, I would like to able to automate the charting process so that I do not have to manually select the varying series range for each variable  and day.
That is possible with VBA, I guess.

 
Answer #5    Answered By: Richie Smith     Answered On: Oct 25

The good news is you shouldn't need VBA to make it happen. Check out this article from Dian's newsletter for step-by-step guidance on dynamic charting by date:

pubs.logicalexpressions.com/.../LPMArticle.asp

 
Answer #6    Answered By: Emma Brown     Answered On: Oct 25

I don't think you're missing anything ...I believe he just wanted to know how to do it as something cool to be able to do. But I take it from your suggestions to use the interface tools...that attempting to chart  via VBA can be a pain in the butt?

Ah yes, with the above comment in mind, I just checked out one of JWalk's Excel dev books and do see that VBA Charting is listed under "advanced" techniques. So I'd imagine the best advise here is that messing with charts  is NOT the best way to go about starting to learn Excel VBA! ;-)

But then hey...MY first Word WordBasic project about 12 yrs ago was to tackle an elaborate sales order form in Word with dynamic dialog boxes! HA...what a fool I was to think that one was going to be easy!<g> Granted...it did provide me with a new career after I got the sucker to work. But the learning curve was a bit painful.

 
Answer #7    Answered By: Willie Gomez     Answered On: Oct 25

I suppose the charting control in VBA is pretty complex; for me, it's one of the least intuitive parts of the object model.

But I've also found that only vary rarely do I need to resort to VBA for charting, and I can think of very few things I'd want to do to a chart  that couldn't be accomplished without code. Code being as hard as it is to write and understand, I always think you're better avoiding it wherever you can. Fortunately, Excel is so versatile that with a little creativity it's often possible to avoid VBA for entire days!

 
Answer #8    Answered By: Pravat Jainukul     Answered On: Oct 25

Let me see how best I can make use of the info from the dynamic chart  links that you have provided.

 
Answer #9    Answered By: Rocco Anderson     Answered On: Oct 25

Yup...further to this, I dropped a note to Jon Peltier, author of that charting article you referenced and also an Excel MVP known as a chart  guru. I asked him about charts  with VBA and he agrees that it's a pain and usually easier not to deal with it if you can get away with it. Although he does use it and mentions some code he has in some of his article. Here're his comments...

 
Answer #10    Answered By: Scott Simmons     Answered On: Oct 25

How about writing an entire laboratory software program in Access and Access VBA! lol. That is what my partner and I are doing. We started working on it last October knowing NOTHING about Access or VB/VBA - what a trip! I have to say it's been a lot of fun, not mention EXTREMELY educational! Our lab is now using our project exclusively for their data  entry and the project continues to grow and expand. In fact this week another area of the lab is beginning their move to our system.

 
Answer #11    Answered By: Raju Srinivas     Answered On: Oct 25

Mostly cos' he has to fix what the devs mess up on the server and tons of space is taken up with single table DBs.<g> So I can appreciate his end of the problem. But *I* love them for solutions.

Yeah, it's VERY frustrating when you can't figure out what the heck you are or are supposed to be doing. But once that LIGHT goes off...it's sooo cool! Of course, there's always another light you have to figure out after that one!

 
Didn't find what you were looking for? Find more on Help needed for a VBA novice with excel charting Or get search suggestion and latest updates.




Tagged: