Link to home
Start Free TrialLog in
Avatar of aikimark
aikimarkFlag for United States of America

asked on

Expert Discussion: VB classic zoning for VBA questions

Experts -- I'd like your opinion on the similarity of the VB6 language and the VBA language (syntax)

I've been adding VB classic zone to VBA questions in the different MS Office zones I frequent.  

Reasons for this zoning:
1. There isn't a VBA zone
2. The VB6 syntax is the same as the VBA syntax
3. VB experts can apply their language skills to any number of Office application zones
Avatar of Bill Prew
Bill Prew

Yes, that's a tough one.  VBA sort of walks a line between VB and VB Script.  Each flavor is a little different than the other.  Personally I think VBA and VBS are the more common, and that VB6 is just a bit different.  For VBA it's important to understand the Office object model well, and Itend to think VBS folks have more experience with that than VB6, but I could be all wet.

~bp
The syntax is pretty much identical, but you can't write good VBA without knowing the OM of the app(s) involved, IMO.
Avatar of aikimark

ASKER

VB script is the most primitive

Both VB6 and VBA have SPLIT() and JOIN()
you, da man.

Hey m_o!  Look at this. :-)
Only VBA6 has split and join; VBA5 did not. ;)
To address your question, I don't see the point myself. People in the Office zones are generally likely to have better vba ability for their app than VB6 guys, as well as a better idea as to when VBA isn't even necessary, in spite of what the OP assumes.
 There are of course exceptions to every rule. :)
Hi all,

From a strictly technical aspect VBA and VB6 share the same code base. Therefore VB6 coding style can be applied for all "under the hood" operations VBA.

Each software in the Office suite that includes VBA has also a unique Object model which VBA interact with. Obviously this is a limitation in VB6.

Another major important aspect is that Windows Forms (VB6) differ from UserForms (VBA).

COM add-ins / Automation Add-ins are usually created with VB6 and here VB6 interacts with the softwares' Object models, calculation engine (Excel) and with VBA.

(OOP can be applied with VBA in a similar way as in VB6 however very few Office developers knows what is and lack any knowledge about it.)

I guess that's what I, in a nutshell, can contribute with.

Kind regards,
Dennis
There are occassions I would add VB as zone, too, e.g. when using standard techniques not depending on Office objects (DB access, text file access, aso.), in particular if there is no progress.
Although VB Classic zone includes all pre-.Net versions of VB, VB6 is pretty much the language standard for Microsoft online help and VB classic web content.

VB6 has access to all of the Office ORM objects with both early and late binding (instantiation).  VBA supplies the current application type's objects by default.
Tired of looking at excel and office questions in VB zone.
> Personally I think VBA and VBS are the more common, and that VB6 is just a bit different.

Concur

> I've been adding VB classic zone to VBA questions in the different MS Office zones I frequent.

Mark, as you'd know the Excel TA talent runs deep, so I don't think there is much upside to adding the VB TA given limited overlap
But do I think its worth adding the VbScript zone
- sometimes askers confuse vbs and vba
- other times automation via vbs is a better solution
- I see the network type questions (Active Directory, WMI etc) are more a core vbs skill than vba. The likes of Rob and Bill add greatly to questions that may be asked in Excel only as that is the input or reporting interface

Cheers

Dave
VB script is a much more limited language than VBA.

VB script should not be part of a VBA discussion unless someone is automating a Office object from a .VBS script.
Can any tell me what kind of overlap there is between VB classic experts and various Office application zones? (beyond the top 25)
I think there are enough nuances in the VBA's associate with each Office app to warrant a VBA zone under the app.  IOW, one VB zone is not enough.
>VB script is a much more limited language than VBA

 My point was there is expertise in the vbscript zone better suited to questions that go to the Excel zone

And fwiw other than having to tweak Excel constants I have had little difficultly doing anything I want to in vbs

> VB script should not be part of a VBA discussion unless someone is automating a Office object from a .VBS script.

If a VBA question is considering automation then it should be in the vbscipt TA
I think the admin who is adding zones should take a brief look at the type of code requested.
Examples: "How do I get all my charts in all the spreadsheets to scale from 0 to 1?" I wouldn't add VB zones to this one

"In Excel VBA, how can I delete files in a directory that have a certain name?" I would add VBScript

Basically if the question is asking about code specific to the Office App, I wouldn't add any zones (except maybe the Excel zone since there are so many VBA people there and all the Office OMs are similar).

If the question looks more like general programming, loops, calculations, and so forth, I would think the VB guys could add some good input.
If your working on a VB6 project your not going to add an Excel Zone to the list or Office Zone. The exception to that is if your automating them *from VB6 that is acceptable. I see to many questions in VB zone that deal with macros and excel spreadsheets, word and access questions that would be better off suited for the Office zones.

* You see a question that is clearly macro and spreadsheet related keep that in the office zones.
* You see a question that VB6 is being used then it's acceptable to place it into the zone.
VB is in and of itself very general.  As I said before, the nuances in the various VBA's associated with each Office app warrant a specific zone.  
I think there are enough nuances in the VBA's associate with each Office app to warrant a VBA zone under the app.

I think there might be a need to have a VBA zone, but not a separate for each app. It is easy to do early binding (<Alt>+<F11> --> Tools --> References) or late binding.

I saw one delivered app many moons ago that the dev built it as an Access, pulled the data into a SS temp, manipulated the data, and wrote it back. Version 1.1 had that code totally replaced, and they were advertising for another dev.

If a VBA question is considering automation then it should be in the vbscipt TA

Yes and no -- I have more than once created an Access DB that on open runs a vba code module automatically. I just fired it off a scheduled task.

Exactly. That's the problem someone that is using VB6 won't place there question in Office zones. If you place Office zones into VB6 then you should also place VB6 questions into Office zones. It could work both ways. So how about you just *always add a VB6 question to the Office zones. I'm sure the experts wouldn't mind sifting through VB6 questions to find an Office quesiton.
@egl1044

If a VB classic question involves some flavor of Office automation, I will certainly add the relevant Office application zone.

I'm not talking about removing an Office application zone from an Office application question.  I'm only concerned about the inclusion of VB classic zone for VBA questions.

If a question isn't code centric, I don't add VB classic zone.  For instance, there are many Excel questions that only deal with formulas and formatting.  There is no VBA component.  Therefore, I would have no compunction to rezone such questions.

The use of the VB classic zone (versus the VB script) is to attract the attention of experts with VB language skill that is directly applicable to a VBA solution being sought.
I think the person adding the zones just needs to be good enough to know when the solution is calling for Office VBA and when it is calling for general VB in a VBA environment.
In a different thread, modus_operandi posted the following logic:
If question is posted in an Office application zone, badgers (Zone Advisors, Moderators and Administrators) should not automatically add Visual Basic or VB Script. Neither should they delete those zones.
If the question hasn't been answered and it is time to alert other experts, then add the classic Visual Basic and VBScript zones.

While there may be circumstances unique to the question that suggest casting a wider net, the above logic (in my opinion) covers most situations.

Back in the old days, there used to be a three line description of what the zone was supposed to handle. I made sure that the Excel description specifically claimed responsibility for VBA macros and user-defined functions because so many Askers got confused by the Visual Basic zones and mistakenly put Excel macro questions there. Before filters, miscategorizing a question generally resulted in slower responses. It also meant that undeserving Experts (such as me) could pick up certificates in Visual Basic that we really didn't qualify for.

Brad
@aikimark

No problem bud, I know your intentions are good. It just stinks to try to find a couple questions and notice they are all office related. Just last night I had to double check to make sure I was even looking in the Classic zone. Farwell to VB Classic zone :( There is a point issue that goes along with this rule though that favors active experts in the Office zones. I say just stick them there since there is 10x more activity in the office zones as far as questions being posted.
The question being adding VB classic to VBA questions, personally I have seen my thoughts above already but basically you need some awareness and for some questions the cross zoning has sense and in most cases would not.  I'm not even a fan of VBS cross zoning whereas bringing in other MS apps would often make sense to me since their experts would have a greater affinity for the nuances of VBA.

Whilst there are times when it does make sense; these I would suggest are indeed wider programming issues rather than VBA per se and therefore each should be treated on it's merits.

Chris
hmmm. VB6 is about to die off (replaced by vb.net)
not sure about VBA, as office products don't start to use .net language in the "VBA" macro stuff ...
> VB6 is about to die off (replaced by vb.net)
it must be dying slowly then considering MS killed it off a whole decade ago this year.
I have no issue with zoning a VBA question in the VB Classic zone, although I think the question author is better served by placing it in more specific zones first - an Access question should be in the Access zones, Excel in the Excel zones, etc. If it becomes apparent that it would benefit from interaction with the VB guys, then we should consider moving it to the VB zone - but not immediately.

FWIW, there are a LOT of people out there who are convinced they are writing the program in "VB" when they drop into the VBA IDE. Those are the ones who will zone their Access or Excel question into the VB zone.
While VB6 licenses no longer is available for sale VBA will be supported within the foreseeable future. If next version of Office will include a new language (whatever it may be) VBA will coexist with it in the same way as the old macro language coexist with VBA.
:> VB6 is about to die off (replaced by vb.net)
>it must be dying slowly then considering MS killed it off a whole decade ago this year.

Yet there are businesses writing software in different markets using VB6.  In my experience, many manufacturing systems have machine automation and robotic that are controlled using an older OS either because they still communicate through com ports or because the PC is proprietary and the Machine manufacturer do not focus on the advances of the controller but rather the control.

There are similarities ( as indicated ) between vb6, vba, vb script.  Zoning differently should be considered only in how it will assist the end user asking the question to know which zone their question should fall.  Thus allowing the EU the best help possible.

It is highly likely that most zoned in Visual Basic "Classic" are also zoned in  all of the other VB types.

As far as the language standard is concerned, there is no difference between VB6 and VBA.
@aikimark,

<< I'm only concerned about the inclusion of VB classic zone for VBA questions.>>

  Depends really on the question.  I would not do it by default.  Too many differences between VB and VBA most fundamentally starting with references.  And there are numerious syntaxual and execution differences.

  For example, in Access, EVAL() would seem to be Evaluate(), but it's not.  In fact EVAL() in Access is not even calling the standard EVAL() in VBA(), but one in the JET expression service, which may or may not call the VBA EVAL().

  A question however on "how do I do a loop" is the same in VBA or VB6.

  I think for the most part though you'd add more confusion.

My .02 worth.
JimD.
Alt+0162 = ¢ ;-)
Personally, I concur with egl1044's earlier comment. I go to VB Classic zone to answer VB Classic questions, and am tired of seeing VBA, Excel, other Office aps, etc questions there. Keep VB Classic zone to VB Classic questions!
@VBClassicGuy & egl1044

Do you avoid VBA questions?
Would it be helpful to have a VBA tag?
Yes. We have to be clear that aikimark isn't responsible for this problem though it's as others mentioned a very general category that users of Office would typically tag into a zone. "Does the classic zone really need more office questions than it already has" would be a better way to sum up this debate.
Short answer...yes, I avoid VBA questions. I have answered a few simple ones, but I have NEVER wrote a single line of VBA code in my life (haven't had the need to in my particular work environment). And there are more differences between VB6 and VBA than most realize. I've been writing in VB Classic since version one, and know the language like the back of my hand, but couldn't answer your average medium-difficulty VBA question.

I have routines I've written to output my reports to Excel and Access, but that's it. I don't have a need to program or bi-directionally exchange data with the Office products.
It looks like this cuts both ways.  My zoning efforts might attract some VB language experts, but it also 'clutters' the VB classic zone with VBA questions.
The way I notice it is if a office question is placed into VB Classic zone only and not other zones it would pretty much stay un-touched until one of the experts from those zones decides to visit the Classic zone. Actually I'm fairly convinced that not many of the office experts visit classic often and the ones that do are well aware of the problem ;)
In a lot of cases, it comes down to the question akser using the "scatter shot" approach to getting their question resolved. And if the question wizard suggests it, then they almost always go with those suggestions. In many cases the asker has already done some research and they've seen the term "VB" and "VBA" pop up in those search results time and again, which leads them to believe that those who are Experts in the subject might be able to help.

I'd be somewhat leery of rezoning a question simply for the sake of "we don't want Office questions in the VB zone". If it's VBA-related, then I can see the reason for including the VB Classic zone. If it's about Access Forms, or an Excel Forumula, then of course there is no need to include the VB Classic zone.

I couldn't believe reading in this thread that there is no VBA zone. So many people use it, there are so many questions, and it is going to be around for quite some time to come. I think there should be a VBA zone, where all these questions can be placed and easily accessed by VBA experts. Now, if an expert wants to answer some VBA questions, he has to check quite a number of zones to get them all. Of course, overflow, and the "scatter shot" method mentioned by LSM will always cause these questions to appear in other zones also, but maybe at least the bulk of them would wind up in a VBA zone if we had one.

And I do agree...most VBA experts would not check the VB Classic zone very often. VB6 is dead and buried (but I'm still gonna use it until they take it away from me), and VBA is still very much alive and well.
Perhaps a single generic VBA zone that could be found under all Office zones?

mlmcc
IMHO, adding a VBA zone would be a disaster.

It will only add noise, not more signal.

You'll end up with some mis-posted VB.Net, VB6, and VBScript questions posted there, and even among the questions that are truly about VBA, a highly skilled Access or Excel VBA dude or dudette could be completely lost at sea if one must use the Outlook, Word, or (heaven forfend) PowerPoint object models.

Brad said it best: when you have a VBA question, 90%+ of the time what you really need is someone who understands the host application's object model.

Adding a VBA zone is not going to facilitate matching question Askers to appropriate Experts.
"IMHO, adding a VBA zone would be a disaster."
I agree. Less Is More.  From what I can see, most of the VBA questions are Access related.

mx
My view of the distribution is that Access and Excel split the VBA content about equally and they dominate the VBA-centric questions of all the other Office products.

I'll try to keep track of the number of times I do this particular flavor of rezoning when looking at the list of open questions in the Office application zones versus visiting a question due to neglected question email alerts.

There is a third flavor of rezoning that I often do that removes questions from the VB classic zone when the question is actually a VB.Net question.  Sometimes I have to replace VB classic with VB.Net and sometimes I just remove VB classic zone.  It does cut both ways.  Sometimes, I'm removing the clutter of completely inapplicable skill sets from the VB classic zone.

Maybe I was fortunate to have done Office automation both from within VB classic applications as well as from within the Office applications themselves (via VBA).  My experience isn't necessarily the same as other VB and VBA developers.  The various Office object models are little different to me from the database objects and file-system objects.
@VBClassicGuy

Remove VB Classic Zone from your list and move into Visual Basic.NET ... VB Classic Zone nothing but MS Excel/Office hybrid.
Mark,

I think this discussion has been beaten to the end.

Jim P.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks to everyone for their participation in this discussion.