Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VBA vs. Visual Basic #2418

Closed
peterennis opened this issue May 23, 2015 · 37 comments
Closed

VBA vs. Visual Basic #2418

peterennis opened this issue May 23, 2015 · 37 comments

Comments

@peterennis
Copy link

VBA != vb
I can only search for Visual Basic. It returns mostly .net code and that is just noise.
VBA should be separate.

@pchaigno
Copy link
Contributor

Do they use different sets of file extensions?

@peterennis
Copy link
Author

VBA is embedded in ms office apps.

If files are exported then default is .bas

Sometimes .mod for modules or

You can make up your own.

Distribution is often inside an office app

So extensions could be

Xls, xlsx, mdb, accdb, doc, docx etc. Ad nauseum...

Someone searching for VBA is typically

Not interested in .net

Thanks

Peter

E.g.

https://www.bing.com/search?q=peterennis+github&PC=U316&FORM=CHROMN

These are VBA repos, not visual basic, so the default github

Description is false

Sent from Yahoo Mail on Android

From:"Paul Chaignon" notifications@github.com
Date:Sat, May 23, 2015 at 8:33 AM
Subject:Re: [linguist] VBA vs. Visual Basic (#2418)

Do they use different sets of file extensions?


Reply to this email directly or view it on GitHub.

@pchaigno
Copy link
Contributor

Linguist currently associates the following extensions with Visual Basic:

  • .vb
  • .bas
  • .cls
  • .frm
  • .frx
  • .vba
  • .vbhtml
  • .vbs

Which of these are VBA? Visual Basic?

@peterennis
Copy link
Author

Not .vb

Not .frx

Not .vbhtml

Not .vbs

However, I could create all them if I wanted :)

Removing those would at least reduce the search spam.

In the spirit of cross platform development, ms 

Honest embracement of os(?), and github expansion,

Perhaps you could have "Microsoft Office VBA"

As the 'language' selection?

Thanks,

Peter

Sent from Yahoo Mail on Android

From:"Paul Chaignon" notifications@github.com
Date:Sun, May 24, 2015 at 3:37 AM
Subject:Re: [linguist] VBA vs. Visual Basic (#2418)

Linguist currently associates the following extensions with Visual Basic:

.vb.bas.cls.frm.frx.vba.vbhtml.vbs

Which of these are VBA? Visual Basic?


Reply to this email directly or view it on GitHub.

@NattyNarwhal
Copy link

VBA is actually just embedded classic VB. Modern VB.NET uses .vb, but classic VB will use the older extensions like .bas and .frm.

.vbs is VBScript, which is its own language altogether.

@peterennis
Copy link
Author

Yes. The issue us that search for VBA returns too much github spam as it brings back all results for VB. Ironically I find better results using google while searching the universe in comparison to the "targeted" subset of github.

@cbeauchesne
Copy link

I confirm 👍
.vb => VB.NET
.bas, .cls, .frm => VBA (or to be more precise, it's originally VB6 extensions)
.frx => binary file associated with .frm
.vbs => VB Script, sort of sub-langage based on VB6
.vba and .vbhtml => no idea

If we could search for VBA code only, it will be very helpfull for VBA coders, have mercy for them ;)

@ghost
Copy link

ghost commented May 30, 2016

I agree with chadebeauche - also .vbs means VB Script what it's scripting language - it's came form VB family but is different from VB.NET and VBA.

We can consider VBS as an old, but still is in use, and should be counted as separated language.

BTW similar extension .svb it's also VB Script file but it's used internally in TestComplete for creating automatic test scripts - I'm not sure but probably should by considered as separate category.

Typically .svb file contains 70-90% of VBS and 10-30% of TestComplete specific features.

@GustavBrock
Copy link

This issue persists. Some VBA repos are even being labeled as TeX. Go figure.

@stale
Copy link

stale bot commented Nov 6, 2018

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.

@stale stale bot added the Stale label Nov 6, 2018
@GustavBrock
Copy link

I have passed this issue/proposal to the Office documentation team - asking them to take over.

@stale stale bot removed the Stale label Nov 12, 2018
@stale
Copy link

stale bot commented Dec 12, 2018

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.

@stale stale bot added the Stale label Dec 12, 2018
@NattyNarwhal
Copy link

The situation hasn't changed to my knowledge.

@GustavBrock
Copy link

I have renewed my request to the "doc people" of Office at Microsoft to take care of this.

@stale stale bot removed the Stale label Dec 12, 2018
@stale
Copy link

stale bot commented Feb 4, 2019

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.

@stale stale bot added the Stale label Feb 4, 2019
@NattyNarwhal
Copy link

AFAIK, this is still an issue.

@GustavBrock
Copy link

It is, but priority at MS seems low.

@stale
Copy link

stale bot commented Feb 18, 2019

This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.

@stale stale bot closed this as completed Feb 18, 2019
@smola
Copy link
Contributor

smola commented Feb 18, 2019

Could this be reopened? As far as I can tell, this is still unresolved and it applies to latest linguist version.

@GustavBrock
Copy link

My MS contact must have gone cold; no response yet.
Could someone else perhaps pick this up? Like @Linda-Editor ?

@Linda-Editor
Copy link

@GustavBrock I'll see what I can do about finding the right person to address this.

@dmahugh
Copy link

dmahugh commented Feb 20, 2019

I agree this VBA-vs-VB-vs-VB.net confusion is a problem, for Linguist as well as search engines in general, but it's not clear what is being requested here. As covered in the readme, Linguist ignores blobs, and XLSX/XLSM files (where most VBA code resides) are zipped blobs. Is there a specific change to Linguist that people are looking to Microsoft submit a PR for?

@GustavBrock
Copy link

@dmahugh : Browse the thread from the start. And VBA does not reside in xlsx files. However, most code has been exported to .bas or .cls text files for the benefit of the GitHub parser and for easy perusing by the visitors. If .frm files exist in a repository, it is VB6, not VBA.

@cbeauchesne
Copy link

cbeauchesne commented Feb 20, 2019

Actually, you can have .frm files in a VBA project, if you have a "form" (basically, a GUI). BTW, it's by far the less common use-case.

+1 for the answer : the point here is to make a distinction between :

  • .vb => .NET world
  • .cls/.bas/.frm => VB6/VBA world

@Linda-Editor
Copy link

To all of you on this thread, if you have an actionable suggestion, please submit a PR. If you're looking for documentation on VBA, please see https://docs.microsoft.com/en-us/office/vba/api/overview/.

@GustavBrock
Copy link

I see a similar pattern:

  • .vb => VB.NET
  • .vbs => VBScript
  • (.bas and/or .cls) but no .frm => VBA
  • (.bas and/or .cls) and .frm => VB6 or VBA (Word, Excel)

zspitz added a commit to zspitz/linguist that referenced this issue Nov 25, 2019
zspitz added a commit to zspitz/linguist that referenced this issue Nov 25, 2019
@zspitz
Copy link
Contributor

zspitz commented Nov 26, 2019

I've tried to write a PR, but have run into some issues. Any help would be greatly appreciated.

@peterennis
Copy link
Author

@zspitz I have no Ruby or linguist experience. Thanks for taking this on 👍

@zspitz
Copy link
Contributor

zspitz commented Nov 26, 2019

@peterennis That makes two of us 😊.

@GustavBrock
Copy link

@zspitz That makes three of us. Sorry.

@zspitz
Copy link
Contributor

zspitz commented Nov 26, 2019

ping @Linda-Editor

@zspitz
Copy link
Contributor

zspitz commented Nov 26, 2019

Question: should the language name be VBA or Visual Basic for Applications?

@GustavBrock
Copy link

The name is Visual Basic for Applications, and VBA is the abbreviation for this.

@zspitz
Copy link
Contributor

zspitz commented Nov 26, 2019

@GustavBrock The name of SQL is Structured Query Language, and yet the name in languages.yml is listed as SQL. Same for eXtensible Markup Language, HyperText Markup Language, ANother Tool for Language Recognition, Comma-Separated Values and Cascading Style Sheets.

IMO, as long as the acronym has wide acceptance, I think makes more sense to use the acronym instead of the alternative mouthful.

@GustavBrock
Copy link

Well, you only asked for the name, not what to use in languages.yml - where VBA will be fine in my opinion.

@zspitz zspitz mentioned this issue Nov 26, 2019
@Alhadis Alhadis removed the Stale label Dec 5, 2019
lildude pushed a commit that referenced this issue Dec 5, 2019
* Fix for #2418 (WIP)

* Fix for #2418 (WIP)

* Remove mistaken aliases

* Sort language names; add/move samples

* Fix language order; update VBScipt color

* Update colors

* Update VBA/VB6 color

* Reorder languages

* PR fixes

* Rename VBA to Visual Basic for Applications

* Update language IDs; go back to acronym

* Fixes for failing tests
@Gagniuc
Copy link

Gagniuc commented Mar 15, 2022

How to make a distinction between VB6 and VBA and VB.NET? The .vbp and .vbw extensions are unique to the VB6 language. Thus, if any VBA files are accompanied by .vbp and .vbw extensions, than all repository is Visual Basic 6.0. Just look on any of my repositories on VB6.

In short:

VB6 - if (.bas and/or .cls and/or .frm and/or .frx) and .vbp and .vbw exist.
VBA - if (.bas and/or .cls and/or .frm and/or .frx) but no .vbp and .vbw exist.

VBScript - if .vbs exists.
VB.NET - if .vb exists.

Note also that the presence of any .xlsm file implies the presence of VBA. Also note that VB6 is the only programming language among these (it is fully compiled).

@lildude
Copy link
Member

lildude commented Mar 15, 2022

That's not how Linguist works. See my comment at #5824 (comment)

@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests