What Is the Future of VBA? [closed] - vba

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
With the new 2007 versions of MS-Office, Microsoft started to "threaten" VBA with VSTA. Since VBA is pretty commonly used, what do you believe its future is in terms of scripting development for the next 3-5 years?
Or, will it be killed suddenly, like VB6?
Autodesk also dropped it (kind of) upon hearing news from MS.

I'd suggest that VB6 wasn't killed suddenly. Official MS support, perhaps, but still the community is alive for both VB6 and VBA here on SO.
As with any technology with a WIDE user/customer/3rd party vendor base, it will take a long time for VBA as a scripting technology to fade away. I would imagine that it will take years for its successor to fully overtake VBA.

Agree with Dick Kusleika about deployment
The problems with deprecating VBA are:
Ease of deployment
Visual Studio - another IDE to learn
For the huge base of working, business-critical VBA apps, where nothing will be added by .NET, why would one want to spend the effort and time migrating?
With VBA, non-developers can knock up quick useful applications within Excel/Word etc. You can't do this with .NET/VSTO.

It will die, IMO, but not suddenly. Excel used to have a macro language called XLM - basically a keyboard playback on steroids. XLM is still supported, and there's easily a dozen people who use it. That's why I think VBA will be around for quite a while. It won't be updated, supported, and maybe not even acknowledged, but it will be available.
Sooner or later MS will integrate .NET with Office apps and fewer people will care about VBA. Right now, I can put some VBA in an Excel spreadsheet, send it to a client, and deployment is done. I can tell the IT department it's an Excel workbook with macros, and they don't feel threatened because they don't know any better. When .NET has deployment options that simple, I'll use it instead. That day will come and VBA will slowly start fading away.

The language has changed & the way things were done (i.e. drag/drop form, create a macro, modify a few line & you are done) will also change.
It won't remain a tool, which a non-developer will find easy to use.
Object model should remain same for basic stuff (Workbook, Worksheet, Range) etc.
New set of things will get added & that will change the object model & hence new learning (e.g. Ribbon Interface)
Not to forget, .net brings in its own concepts/complexity.

Related

What tool can I use to extract complex interfaces from VB6 classes? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a relatively complex set of VB6 forms and classes that need conversion to VB.NET. The classes are complex across COM boundaries, supplying interfaces and events, and sinking events from other COM classes.
None of the classes marshal variant or other complex data types across COM boundaries, so I don't need to try and do anything really difficult with the interfaces.
Are there any tools available, free or commercial, which can automate that, given a copy of VS2010 and a wallet full of money for utilities, but not consulting services?
Please see a question I asked once similar to this here: VB6 code upgrade. Look at the answer from Olivier Jacot-Descombes who talks about the tool available in Visual Studio.
I would suggest rewriting the code as in my experience it is time well spent.
I had a similar task to do and for me the simplest way was to upgrade the VB6 code to .Net using the wizard in Visual Studio 2005. Then upgrade the project to Visual Studio 2010 and then use a refactoring tool to extract the interfaces.
No need for expensive third party tools although you'll still have to manually check all the interfaces to make sure nothing has been missed out.
Spend the money on VB Migration Partner or Artinsoft VB Upgrade Companion and let the tool convert the code as well as extracting the interfaces.
You obviously need to parse the VB6 code, and extract name and type definitions. There aren't a lot of robust VB6 parsers around.
We have one of them, built on top of our reengineering tool foundation, DMS. You can get these as products, and configure them for your purposes. The VB6 front end provides parsing to full ASTs with all details; DMS provides additional machinery useful for building symbol tables, doing type analysis, and support data flow analysis, which is likely what you'll need if you want to know which interfaces use which. This isn't any easy task, as these pieces of machinery are fairly complex (due that the fact that real programming languages such as VB6 are complex); most people are more interested in services to just make a migration happen but situations vary. See VB6 migration tools. (I'm the CTO behind DMS).
You can always write a Perl script to try and extract this information. This will likely get it right 70% of the time; your energy will be spent in trying to figure which 70% is correct, how to patch the other 30%. If your system is pretty small, this might be easier.

What exactly is VBScript, and what books/online resources could I use to learn it? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have some programming knowledge, I can write console applications in Python, Java, and I can do both console and GUI programs with VB.net. Since I know VB.net, I though I should learn VBScript. I read online that it is a language used on Internet Explorer, but the tech department at my school writes applications in a text editor and saves them as a .vbs and runs them on the computer(no browser needed). I have used this method to make a simple Message Box(MsgBox"message here",4,"title here"). Is this a single language able to be used in both environments, or are these two separate things?
I read online that it is a language used on Internet Explorer...
Yes, VBScript can be used as an alternative to JavaScript. But, in practice, nobody uses VBScript for web application development because it works only in Internet Explorer.
...but the tech department at my school writes applications in a text editor and saves them as a .vbs and runs them on the computer(no browser needed).
Yes, and many problems can be solved with VBScript. VBScript is a complete programming language and it can access the COM subsystem in Windows. What I like about VBScript is that it is available on all Windows systems. So, it is wonderful solution when you have restrictions that prohibit you from installing other language interpreters/runtimes such as the Java JRE, Python, Perl, Ruby, etc.
For an example of what you can do with VBScript, see this example which demonstrates reading a key from the Windows Registry.
And check out my post here for a pointer to downloading Microsoft's authoritative VBScript reference as a Windows help file.
All that said, Microsoft has pretty much stopped enhancing VBScript and is putting its energy into PowerShell. PowerShell is very much aimed at System Adminstrators and it is an exceptionally capable language when used for that purpose. However, the last time I looked, PowerShell was weak with respect to creating your own classes. (Or at least it was awkward.) As an application developer, though, when I am solving a problem with VBScript, I typically make use of classes via the Class keyword extensively. A lot of folks don't know this, but you can do object-oriented programming in VBScript, and I do so often.
Check out this example that shows how you can develop your own classes via the Class keyword in VBScript.

Pair Programming in Parallel with Dropbox [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to program with a friend (or a couple) out of the same dropbox folder for a project. I want to put all the assets in the same folder, including config and db files. What I really want to know, is why this might be a bad idea.
I can already think of a bunch of positives:
Quickly sync work. As in, almost instant sync. Dropbox, I've noticed, really is that fast that it is almost like working local.
Program multiple parts at the same time
Dropbox is fast enough to allow one person to add a method, and then another person ad theirs a moment after
Eclipse or Gedit both check for changes in the files so we won't accidentally end up with a conflict.
This isn't a substitute for proper source control and versioning, which we would still use Git for. Dropbox does have 30-day versioning, but for obvious reasons, it is no substitute.
I think this is especially powerful in the beginning when this are changing so fast that every team member having the exact same copy of everything is very important. This is a Rails apps if that matters.
Don't use Dropbox for that, because you'll be on the phone/IM/whatever trying to figure out who is going to edit a particular file (no concurrency AND no checking out!). Use a concurrent versioning system like GIT or Mercurial. There are tons of other advantages. On the downside for Dropbox, you will end up with "conflicted files" all around, which you won't know what to do with much.
The other advantages to a real version control system are well-known. Here's a list from some random blog:
File space.
Let’s say your code
changes 10% each week. Under the
“folder backup” method, each week
you’re saving 100% of the code. Using
a proper VCS, you’re only saving 10%
of your code. I know hard drive space
is cheap, but it’s not free and I
never seem to have enough.
History.
The key to VCS, in my opinion, is
being able to document your changes in
more granular level than a file called
“Changelog.txt” that might not get
changed whenever you work on your
code.
Bug-location:
Let’s say you find
a bug in a method. You search the
history for that file and let the VCS
runs the diffs for you.
Complete
freedom to change code.
You don’t have
to worry about breaking something, or
removing possibly useful code. Before
I moved to VCS, I used to comment out
old code liberally but keep it ‘cos I
might need it. This quickly becomes a
PITA.
If you use git, there are several providers for free or cheap online repo.

Practical limits of Word/VBA apps [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
The company I work for has an internally developed Word2003/VBA application that's already about 6.5 mb in size and they're looking to add an additional 200+ macros to it, which, I'm assuming, will make it much larger. This seems to me to be a terrible idea, but finding resources to redevelop the tool with VSTO or some other more useful technology will be a challenge.
So here are my questions:
Is it okay, in a pinch, to have a
business dependency on a Word
template with macros that's 10, 20,
or 30 mb?
Is there a Microsoft-defined or
suggested limit (file size, number of
macros, level of complexity) to how
far you can/should extend a VBA app
before it becomes unusable?
In essence, I'd like to know if there is a compelling technical reason to bite the bullet and redevelop this app.
This will give you the limits of Word 2003/VBA: Operating parameter limitations and specifications in Word. Given the limit is 150 macros, it doesn't look like they will be able to continue to use this to add 200+ macros.
I would look at moving some of those macros to an Add-in. Still VBA, but can be used on multiple files and gets the code away from the data (which is a programming win, generally).
--Edit--
As for scaling and size... I think it's all in the design. If it is thrown together, performance will suffer. The file can handle the overall size, but there are limits to Module size (64k), and procedure size (not well documented, but the IDE will let you know when you've hit it). If you start to approach 30mb of text only then you're going to want to find another solution.
You haven't mentioned security, but since this has to do with medical information it should be said that VBA is not secure. If the code is proprietary, and being offered to outside sources you might want to wrap it up in an .xll and install as an add-in. This might actually offer a faster runtime as well.
I know this is an old question. But its seems unlikely there were 200+ macros. Unless they've made every function, or sub a seperate macro, instead of putting them all in the one Macro.
You can write a VBA application within a word macro. But this doesn't sound like it was. Its just a a bunch of macros.

Best tool for Software System Diagramming [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Over the years, I have tried many times to find a good, easy to use, cross platform tool for some basic software system diagramming. The UML tools I have tried seemed to get in my way more than help. So far, the solution I keep returning to is Visio, which is both Windows-only and expensive. Although its far from ideal, it does provide some basic building block and allows things like grid placement and zooming. I wanted to see if there is a great tool out there that I'm just missing that fits at least some of the criteria mentioned.
Graphviz FTW!
What could be more hardcore than writing a text file to convert into a diagram etc...
GUI, we don't need no stinkin' GUI!
You could try DIA, though it is a bit basic it will keep out of your way when doing pure diagrams.
http://www.gnome.org/projects/dia/
Well, I guess you mean for Windows. Otherwise for the Mac, nothing I know can beat OmniGraffle. Not only it is so easy my grandmother could use it, it can actually make really "beautiful" diagrams. It is really not too expensive (version 5 is now $99, but older ones used to be less than $40; still got a cheap one) and it can do it all, network diagrams, flow charts, UML digrams, UI mockups, etc. The app is clever, it thinks for you in a way, e.g. it will detect that you try to align objects on a line or have equal spaces between them and offer you hinted drag'n drop to make sure these criteria are met. As I said, it's really easy to work with OG.
And it can even also existing Xcode project (the standard Mac IDE for programmers) and automatically generate graphs from your source code. A complete UML chart by just pulling your Xcode project onto the icon :-) I guess it would be great if they could port that to Linux or Windows, but I'm afraid it will never happen.
Enterprise Architect (http://sparxsystems.com) is the best and very affordable.
I've used Edge Diagrammer... It does what you want simply and quickly. Supports grid placement and zooming. It's Windows-only, and it's gotten more expensive than I remember, but still cheaper than Visio.
I like Visio
If you have to use software, Visio is my favorite. (I get it for free through my school's CS program)
But... I find the best tool out there is a 17" x 11" sketchpad, sure it's made for artists but nothing beats a massive piece of paper for figuring out design problems.
The most productive diagramming, in my experience, is done on the whiteboard.
I capture in Visio, though, it has more tools and shapes than anyone else, and you can extend it to do code generation.
Sometimes I use yEd. It is a Graph Editor, but it is perfectly able to be used as a diagramming tool.
MagicDraw is quite good IMHO.
The best free solution that I'm aware of is Dia. It's marketed as a casual Visio replacement.
There's also Kivio, which I've heard good things about but haven't personally used. That one's multi-platform and free.
I use Violet UML Editor for most of my diagrams. It's not cluttered with code reverse engineering and code generation features and makes creating elegant simple diagrams very easy. Best of all it's free.
TopCased http://www.topcased.org/index.php
BOUML: http://bouml.free.fr/index.html