PDA

View Full Version : Solved: Which VB do I Need?



chrisatleo
04-04-2005, 05:54 AM
I have a turnkey DOS package written about 15 years ago and routinely modified since, that manages most of my varied documentation production for my business. It is now struggling, largely due to the failure of Redmond to continue supporting DOS, so I shall soon be forced to rewrite the code in something like Visual Basic.

I would have to learn VB as I only have a general understanding of it, but that is OK, I have the time and (I hope) the ability.

What I am uncertain about is which implementation would be best.

I will not be coding for the web, just for a local network, and I don't need an all singing all dancing do everything suite. I just want a menu driven suite that will be calling Word functions to produce documents on a daily basis, no two of which can ever be the same, from a variety of modules, reading from Access, and processing and saving real time generated data in a suitable format for use later by other parts of the suite, (and possibly in a form that can be read by Sage Accounts). Ideally the suite would run on a number of workstations, with a central data server.

I can buy Visual Basic .NET Standard 2003 from Amazon for around ?76 but will pay more if necessary.

I have no problems with learning the language or designing the package I want, (I have the DOS package as an example) it is just the choice of the right tool.

So do I need to go for Visual Studio .NET or will the Amazon one be OK? (I know this is not an easy question!).

I have no plans to use the program for anything other than this task, and I don't want to make a career out of this!

Any comments much appreciated

Chris Lovelock

Anne Troy
04-04-2005, 06:31 AM
Yo, Chris. :)

We're not really a VB forum. We're VBA.
You might do better getting more opinions from a place like:
http://www.visualbasicforum.com (http://www.visualbasicforum.com/)

Poor guy...I just keep sending you off, don't I?
Good luck!!

(Also, I'm not saying that there won't be a few opinions thrown at you from our members, too!)

Killian
04-04-2005, 06:52 AM
Hi Chris, :hi:
You'll probably get a varitey of opinions on this one so I suggest you listen to a few before spending time and money on this... here's mine:
Visual Studio is the proverbial sledge hammer to crack a nut in your situation. To be honest, so is VB.NET if you're certain you won't want to do any more than this kind of thing. The bottom line is, Mr Gates has decided to take his software development packages in one particular direction and most people feel obliged to follow (with good reason in the commercial world). He's assumming at some stage you'll want the whole world to use your software and access your data from the net, hence all the bells and whistles (and insanely complcated prcedures). If your simply doing your own thing and want the best tool for the job, I suggest two options:

VB6 (now also known as VB Classic)
This will be the "visual" or windows form-based equivalent to your existing product. Programming in VB6 is very easy to pick up and has a huge online community available for support/code sharing. The only problem may be getting hold of a new copy since MS have moved on to the whole .NET thing. You may also want to consider similar environments like Delphi (tho' I'm not sure why ;-) )

VBA
From what you've said, I don't see any reason why you couldn't use VBA to achieve all this. Same ease of use (since it's Visual Basic) and very easy to construct a maintainable, modular system since it's based in the apps your using. Your already using an Access db - It's the next logical step (from the info you've given).

Well that might be the answer you'd expect on a VBA forum :giggle

Paleo
04-04-2005, 09:08 AM
Hi Chris,

I would recommend VBA too and totally agree it will be very hard to you to find a new VB 6. Actually, Microsoft still sells it but you will have to pay the same price as Visual Studio what would be paying for more than what you get.

Another good option is to migrate to .net because it will be a lot easier to work with it when you go to Longhorn and you dont need to spend a dime for that, just do a download of a free tool to develop and choose which language you prefer to use from VB.NET or C# (better support for C# with intellisense).

Download Sharp Develop at: http://www.icsharpcode.net/OpenSource/SD/Download/GetFile.aspx?What=Setup

You can even migrate you Access database to a SQL Server 2000 free of charge using MSDE, downloadable from here: http://www.asp.net/Tools/redir.aspx?path=msde (database size limited to 2 Gb).

chrisatleo
04-04-2005, 11:27 AM
Thanks all

If Ii understand it right, VBA is built in to the various office apps and is presumably a subset of VB (or Visual Studio)?

My concern is to build a menu driven input system that is uncluttered but dynamically able to create documents (and database entries) from user input.

Each document is unique - there are a large number of standard elements, a selection of which are incorporated into each individual document, which one is dependent on input data. These elements have embedded variables which take other input data and often further process it.

So I don't need (or want) to see the document during the creation process, but really want something like an Access record with input. Only when the document is finished would I want Word to show it for proofing and printing.

Is what I want a full VB project, or could this be done with VBA?

I get very confused by the variety of versions of MS apps that are available, and the pricing schemas that are used. (I am still trying to find out which version of Windows 2003 server software I now have to buy!).

So the bottom line is: is VBA flexible enough, or do I need VB.NET, in which case is the Amazon offering the right one?

Many thanks Dreamboat, for your help on the other issue. Aren't you glad I didn't offload this on you as well? Guess that phone call could have got kinda long! I will look at the VB forum, but this one here has lots of interestng stuff too!

Christopher :banghead:

Killian
04-04-2005, 12:11 PM
Hi again Chris
If I understand the basic concept here as you describe it, I believe the most straight forward solution would be to automate the Word document production with VBA from the Access database. That's somthing that, in principle, is pretty straight forward.
An alternative method (or an additional feature, if you felt so inclined) would be to use VBA in a Word addin to control and output the data from Access and populate the document.
Since VBA is part of each app there's no software to buy, the code is integrated and because the code has a host application, deployment is fairly straight forward
A third way (to hijack one of Tony Blair's favoured clich?s) would be to knock up an app in .NET (VB, C# or a mixture of both) that gets the user input, gets the data, runs some code-behind to bring it all together and passes it to a document it creates. The .NET approach is the one that offers the greatest range of choice and flexibility when it comes to how you design and distribute the finished product. You're running this from a server, so the entire app could remain server-side and you could make a web-app for the user interface, so the only thing needed client-side would be a compatible wed-browser. You could output the document in a number of ways but if it needs to be edited later in Word, the user would need it installed (tho it could be done as a background process). Any future development or maintenence of the app would be more convenient. For example, if you later needed to port the database over to SQL, you'd just need to deal with that aspect of the code base.
The down-side of .NET? Well there's certainly a lot more to learn. Depending on your experience, the learning curve is steep for quite a while and will probably eat up a lot more development time that the VBA options. The higher price, in all respects, would be more of a long term investment in the product and if you really don't want to make a career out of it, it seems like quite a big task.

Anne Troy
04-04-2005, 12:19 PM
Also, Chris, you might want to check out:

www.wordtricks.com (http://www.wordtricks.com)

Howard Kaikow
04-05-2005, 04:20 AM
If the code is to be used locally, i.e., you are not concerned about protecting the source from prying eyes, then initially do it all in VBA from within Office itself, nothing additional to purchase.

After you (are near finished with the VBA, it's gonna take a long time), you could then consider whether you wish to automate Word via VB 6 or one of the .NET languages.

Paleo
04-05-2005, 05:25 AM
You simply must have in mind that in order to use any .NET language you will need to have the .net framework installed in your machine.

Why do you still want to buy something from amazon if I provided you with a link to download for free???

Thats not piracy, thats a free software.

Anne Troy
04-05-2005, 02:47 PM
Chris: smozgur (member here) and I developed an application using only VBA. It was for a company that bought life insurance policies from old people. The investors bet on the odds that the person would die sooner rather than later. So, we developed a system where the user entered everything through a Word userform (NOT forms like I showed ya!). Once the information was entered, the data went into Excel and was made into charts. The charts were copied back into Excel as pictures, and the rest of the data was put into an Access database on the server. The nice part? User is using Word. Never sees Excel or the database. Another cool part? All data is stored in the database and while we created electronic copies of the documents, we didn't need to! They could have been recreated on the fly. The Word userform allowed the user to also choose a salesperson; they entered the potential investment amount, and the name/address/etc. of the potential investor. The document was like 30 pages long. Once a new one had been created and printed, it could be brought up again through the Word form (which was really just a view of the Access DB). It was VERY VERY cool. All VBA.

:)

chrisatleo
04-08-2005, 08:49 AM
OK folks, you've persuaded me to try VBA... no doubt I'll be back when I get into it (and stuck!...).

Thanks for all your tips, I'll keep looking here for more.

Christopher

Paleo
04-08-2005, 09:43 PM
Great Christopher you made the best choice!

Anne Troy
04-08-2005, 09:47 PM
Chris: Click on the link at the top right of the forum. Eventually, you'll get to a link to our Lesson 1 of VBA training. It's Excel, but VBA is VBA and that first lesson is really good for all the apps. And best of all...it's free. :)

Paleo
04-09-2005, 08:47 AM
So, Chris is this question solved for you?

chrisatleo
04-09-2005, 09:51 AM
Carlos

For now I would say yes, as I now have the means to goforward. I will probably be back with specific questions when my ambition exceeds my ability! but in the meantime, thanks again to all.

Christopher

Paleo
04-10-2005, 11:33 PM
Great Chris,

so I have marked this thread solved!:thumb