Rules
Terms of Use

Topic Options
#204449 - Tue Dec 02 2003 11:01 PM Visual Basic ?
halfbakedangi Offline
Prolific

Registered: Wed Jun 11 2003
Posts: 1576
Loc: Kolkata India                 
Our school is teaching us Visual Basic, so I feel that maybe I should get Visual Basic as well. So does anyone know where I can get Visual Basic for free ?

Top
#204450 - Tue Dec 02 2003 11:53 PM Re: Visual Basic ?
Leau Offline
Forum Champion

Registered: Sun Jun 16 2002
Posts: 5337
Loc: Nijmegen/Brisbane
As far as I know Visual Basic is a programming language created by Microsoft. If you use it to write a program, it won't be executable on its own. The code will be compiled, but to run it, you'll always need some runtime libraries. You can download them free from the Microsoft site.

I don't know exactly what you mean by getting Visual Basic, but if you're saying that you want to get a programming environment, you might want to have a look at this site. It has information on several downloads. I hope you can find what you're looking for. I don't have much time right now, so I can't find out anymore details. Sorry!
_________________________
The cost of living has not affected its popularity - Loesje

Top
#204451 - Mon Dec 08 2003 01:11 PM Re: Visual Basic ?
A Member Offline
Multiloquent

Registered: Fri Nov 23 2001
Posts: 3082
Loc:  
A Visual Basic editor is supplied with Microsofts Excel programme. Start Excel, (New file, Worksheet)
Select Tools then Macro and one of the options is the Visual Basic Editor.
Now if someone can point me to a place where I can find the basic commands, I might be able to use it
_________________________

Top
#204452 - Wed Dec 10 2003 08:44 AM Re: Visual Basic ?
oleg_mcnoleg Offline
Prolific

Registered: Mon Apr 22 2002
Posts: 1438
Loc: West Haddon
England UK
1. hit the "record" button
2. go through some pretty simple commands on the spreadsheet (type, cut, paste, sort)
3. hit stop.
4. open up the VB editor
5. have a look in the top left window (should be) under the file you currenlty have open and open/expand "modules" you will see (unless you changed it) a "routine" (this may already be open when you go to the editor)
6. the routine is the Visual Basic set of commands for what you did to the spreadsheet in 2 - it looks a bit complicated but some of it should be followable.
7 if you go back to excel spreadsheet and change some of the data then select macros - run - macro1 - you should see the same changes as you performed in 2 re-run on the amended data.

VB is excellent for repetitive tasks.
Once you get moving on it it gives you lots of flexibility in manipulating & automating data that excel wouldn't otherwise allow.
_________________________
i've been searching for the young soul rebels -i've been lookin' everywhere - i can't find them anywhere - where've you hidden them?

Top
#204453 - Fri Dec 12 2003 04:07 PM Re: Visual Basic ?
A Member Offline
Multiloquent

Registered: Fri Nov 23 2001
Posts: 3082
Loc:  
Oleg - I followed that - how do you tell the macro to select the cell/line that you are currently in (not the one you are in when writing the macro(the adress of which is recorded in the macro) and to start the procedure from the cell that you are in when you start the macro?
_________________________

Top
#204454 - Tue Dec 16 2003 05:25 AM Re: Visual Basic ?
oleg_mcnoleg Offline
Prolific

Registered: Mon Apr 22 2002
Posts: 1438
Loc: West Haddon
England UK
Fosse4 - if you look at your code you will probably have a load of script that looks like this

Range("E10").Select

what you need to do is replace your first range selection with

ActiveCell.Select

this selects the cell that you have "open" on your spreadsheet

and then any subsequent operations (where the range selected is changed) replace with

Selection.Offset(3, 1).Select

this applies a "down (3) and then across (1) " offset to pick the cell to do the operation. (if you follow me?!?)

in old excel VB there used to be an option to use relative positions when recording macros - doesn't appear now - but that's progress for you!
_________________________
i've been searching for the young soul rebels -i've been lookin' everywhere - i can't find them anywhere - where've you hidden them?

Top
#204455 - Tue Dec 16 2003 12:16 PM Re: Visual Basic ?
A Member Offline
Multiloquent

Registered: Fri Nov 23 2001
Posts: 3082
Loc:  
Thanks Oleg - I'm sure you are right - I'll give it a try.

As you say "there used to be an easy way" but that's progress?
John the Fosse4
_________________________

Top

Moderator:  flopsymopsy, ladymacb29