Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a good way to learn Visual Basic from home

Status
Not open for further replies.

Sighbot

Technical User
Jun 26, 2012
2
US
I am interested in learning to use Visual Studio. I am a structural engineer but never took any programming classes while in college. For work, I have modified several existing programs that do things ranging from setting user variables to copying files/folders to populating forms in word documents. I am not sure what language these were in but the file names of the programs all ended in either .hta or .vbs. I have also created a tool using Microsoft Visual Studio Express 2010 that basically links to commonly used programs, websites and network folders that several of my co-workers have started using quite a bit also. This has lead to several co-workers requesting different tools to be made to make their jobs easier and I have fallen short on some of these requests simply because of my lack of programming experience.

Is there an online course that anyone would recommend for a beginner like myself? I am mainly interested in creating tools that can move or search for particular files or folders and also creating tools to fill out forms that we use in Excel and Word for almost every job that we work with.

Thanks in advance for any help that can be offered.
Tyler
 
hi,

In addition to Visual Studio/VB, since you mentioned Word & Excel, both of these applications (as well as many others) have packaged in them, a Visual Basic Editor for Visual Basic for Applications, a subset of VB for that application. Hit alt+F11 in any MS Office application, and up pops the VB Editor.

So there's lots you can do with VBA @ home if you do not have VS @ home. Check out forum707 if you care to explore this feature.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thanks for the reply Skip,

I have used the alt+F11 feature in Word and Excel on several occasions. I generally look through the code looking for patterns trying to figure out what does what. This has yielded some success usually through trial and error. It as also left me sitting at my desk scratching my head on multiple occasions.

The main thing I am looking for is a way to build a solid foundation for programming so I can start from scratch. I am a very visual learner so I really liked using VS-Express since it is base on first creating the UI then filling code in from there. Setting up the UI is the easy part for me, filling in the code behind it where I hit the brick wall.

Tyler
 


In Word or Excel, you can turn on the macro recorder and record some sort of process. Then you can look at the recorded code which can be helpful. If you have questions, post your code and question in forum707, and you'll get lots of help customizing your code.

Browse the programming forums and observe threads that have STARS posted.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Since you are a structural engineer, I imagine you are no stranger to book learnin'; in which case I suggest you start at your local library. You'll likely find a few books on Visual Basic (it is a popular language), and even if the book is for an older version almost all of the content concerning language features and programming constructs will still apply (descriptions/features of the GUI will likely be the largest change). While you are at the library, check to see if they have any digital offerings. I live in a small/mid sized city, but the library has a deal with Safari books online that allows anyone with a library card access to hundreds (possibly thousands) of current version technical books. Also, amazon has dozens of books on VB; many of which allow at least a few pages of preview (some allow you to read a few entire chapters). Some of the "kindle" previews are longer than those on the main site (you can get a free kindle reader app for your PC or mobile device). This is a great way to see if a book is readable and "at your level" before you commit to a purchase.
 
I picked up a book a couple years ago titled "Microsoft Visual Basic 2008 Express Edition: Build a Program Now!"

It walks you through creating a VB application to grab weather info from MSN and display it in the taskbar, and along the way gets you familiar with writing functions and subs and such, interacting with a web server, getting XML and a few other things. It explains how it all works and how it is being used, but is focused mostly on what your using it for versus everything you could do with it.

Still, it got me started. After doing that and then modifying it to add a couple things, I started looking at apps that I'd like to have. So I created a program and database to inventory all my DVD and Blu-ray movies (including a section to track which people I've loaned discs out to). That had a bit of a hefty learning curve as I didn't know how to store an image in a Microsoft Access database, and then how to get it back out and such. I learned how to add/delete/manipulate data in the DB file using Google and searching for each individual element or thing I was trying to do.

After that I wrote a program (an agent really I guess) that uses UDP on the network to signal other computers with the same program and raise a visible and/or audible alert when someone is going out for a smoke break (lots of folks at work like this one). I just recently wrote an MP3/WAV/WMA audio player for an old touchscreen computer for a co-worker. He wanted simple to manage playlists and really big buttons so they were easy to press. I stored the playlists as textfiles, set it up to create/manage/delete those lists, and shuffle/continuous play with volume and tone controls. He's happy as a clam, and I learned it all on Google.

So basically, come up with an idea of something you want, some utility or simple function or some-such that you'd like to have at home or work or whatever, then write it. Google all the things you don't know or don't understand, and when you get it working the way you want, and have it look the way you want, then go buy yourself a beer and think of the next utility you want to write.

That's what I've been doing off-n-on for the last year, and now I can write most of this more basic stuff either out of my head or using the built-in Intellisense stuff in VB Express since I've already seen a lot of it and I now have a good feel for how the language works.

I just today finished an app that monitors different computers and network devices to see if they're online, and if it's a PC it checks to see if a specific program is running and who's logged into the computer at that moment. Most of that I already new how to do from previous things I tried, I just needed to learn how to use ListViews to handle/display all my data (and thank you Google for helping me find the answers on that). The rest I already knew, and in fact I worked up the code layout and interface before tackling that final listview part, which took me about a day to learn and understand and then tweak to my liking.

All that started with just one book and being very comfortable using Google to figure out the rest. I've found a few good web sites along the way that usually have many answers for me (including this one) and they've become staples in the Bookmarks on all my computers.


____________
Buzzwang
"I can fix it!"
(maybe...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top