Results 1 to 17 of 17

Thread: Learning Visual Basic

  1. #1
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Learning Visual Basic

    As a part of the second year of the computer course I am doing at college we will be learning Visual Basic.

    We have already used it in Excel, which I found quite easy. We did not do much, only make a simple order form. I was able to successfully change some of the code for a marco that went wrong.

    I want to get ahead of the rest of the class by learning some of it over the holidays.

    What book(s) should buy?

    I will also need Visual Basic (other then the version on Excel), I know some books come with it.

  2. #2
    Ultimate Member tibilicus's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    2,663

    Default Re: Learning Visual Basic

    I would love to say a great book to buy but, I only use the computer for one thing, MSN and games. Infact what was the point in me poisting? Ohwell maby i just wanted to talk to you Martinus.


    "A lamb goes to the slaughter but a man, he knows when to walk away."

  3. #3
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    I would love to say a great book to buy but, I only use the computer for one thing, MSN and games. Infact what was the point in me poisting? Ohwell maby i just wanted to talk to you Martinus.
    Great

  4. #4

    Default Re: Learning Visual Basic

    Heres a good site to get you started:
    xtreme visual basic
    "How do you tell a communist? Well, it's someone who reads Marx and Lenin. And how do you tell an anti-Communist? It's someone who understands Marx and Lenin." -Ronald Reagan

    "It's somewhat ironic that closing spam threads increases my postcount"
    -Ser Clegane

  5. #5
    Eliminated Faction Heir Member Laridus Konivaich's Avatar
    Join Date
    Mar 2005
    Location
    Playing with swords
    Posts
    1,224

    Default Re: Learning Visual Basic

    Hmm... don't know any good books or sites off the top of my head, but I could look for some. I know that there was one book that I found to be very good, I will have to look up the title.

    In case you didn't already know, the visual basic in excel is different from both visual basic 6, and the current bersion of the language, vb .net

    plk
    Map designer for the Age of Hellas Mod: Age of Hellas Forum

    "I vote for closed."
    Two posts later:
    "Argh...I forgot that I actually have to close topics in order for them to close." ~Big King Sanctaphrax link

  6. #6
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    In case you didn't already know, the visual basic in excel is different from both visual basic 6, and the current bersion of the language, vb .net
    I know that the Excel version is different.

    What is the difference between VB6 and .net?

  7. #7
    Eliminated Faction Heir Member Laridus Konivaich's Avatar
    Join Date
    Mar 2005
    Location
    Playing with swords
    Posts
    1,224

    Default Re: Learning Visual Basic

    Quote Originally Posted by Martinus
    What is the difference between VB6 and .net?
    Spelling? VB6 is older, and will soon no longer be supported by Microsoft, .NEt is newer (2003) and has become a fully object oriented language, which 6 was not. For example:

    Code:
    msgbox "Hi, welcome to my program!", "Welcome!"
    
    versus:
    
    messagebox.show("Hi, welcome to my program!", "Welcome!")
    The differences, at least from what I have seen, are not too difficult to overcome, at least moving from 6 in .net, but what you should probably do is find out which version you will be learing in the class next year, so that you know what you should study on your own.

    Map designer for the Age of Hellas Mod: Age of Hellas Forum

    "I vote for closed."
    Two posts later:
    "Argh...I forgot that I actually have to close topics in order for them to close." ~Big King Sanctaphrax link

  8. #8
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    I found the hand-outs from last year and the guide they give you is about version 5.

    http://www.edexcel.org.uk/VirtualContent/29839.pdf

    This is the course I am doing. You don't all the units.

    I did 1, 2 ,3, 9, 12 and 13.

    I will be doing 4, 5, 6, 7, 14 and 16.

  9. #9
    These titles are too shor Member TonkaToys's Avatar
    Join Date
    Jan 2004
    Location
    Hitchin, UK
    Posts
    588

    Default Re: Learning Visual Basic

    Standard VB is pretty straightforward if you've ever done any programming. It starts getting "fun" when you have to call Excel functions, or DB functions or API functions, although all of that is much easier now in .net.
    SAMS do a good range of books, but really if you understand logic (if then, for next, select case, while wend, etc) then you only really need a reference book.
    Good luck.

    Ta-ra

  10. #10
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    I bought Visual Basic 6 for Dummies.

  11. #11
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    Oh great, the CD that came with the book does not have VB6 on it. The source code on the CD does not work with the VBA on Excel.

    Is there is way to make it work on VBA?

    If not,

    Where can a get a copy of VB6?
    Is it expensive?
    It so, how can I get it for free? (the book cost £30, I do not want to pay a lot for it.)

  12. #12
    These titles are too shor Member TonkaToys's Avatar
    Join Date
    Jan 2004
    Location
    Hitchin, UK
    Posts
    588

    Default Re: Learning Visual Basic

    The VB6 source code should be similar to VBA... what version of Excel are you using in case that makes a difference?
    Actually, it could be good practice for you to take a simple piece of code that doesn't work, run it through the debugger and then try to fix the errors. That might be a good way of getting your head around it.
    What type of errors are appearing? Perhaps the .Org can help.
    I don't think you can get VB6 for free, legally.

  13. #13
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    I load up Excel and put the disk I got with the book in.

    I go to file then import file and locate the file I want.

    Then it says:

    The form class contained in D:\Chapter3\Hello1.frm is not supported in VBE. The file can't be loaded.
    I will put the files on the C drive, to see if that makes a difference.

  14. #14
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    That did not work.

    I am running Excel 2000, though my OS is XP.

  15. #15
    Lord of the House Flies Member Al Khalifah's Avatar
    Join Date
    Jun 2004
    Location
    The Golden Caliphate
    Posts
    1,644

    Default Re: Learning Visual Basic

    What is the difference between VB6 and .net?
    Visual Basic.net uses the Microsoft dotNET framework which makes it a more fully object oriented language. It's much tighter in a lot of areas in terms of what you're allowed to get away with. There's also no more 'Any', but since you haven't used VB6, that won't bother you, neither will the near eradication of 'Get' and 'Set'.

    dotNET programs and assemblies can be registered for interop with COM (pre-dotNET assemblies) easily. Doing the reverse is very difficult.
    Cowardice is to run from the fear;
    Bravery is not to never feel the fear.
    Bravery is to be terrified as hell;
    But to hold the line anyway.

  16. #16
    These titles are too shor Member TonkaToys's Avatar
    Join Date
    Jan 2004
    Location
    Hitchin, UK
    Posts
    588

    Default Re: Learning Visual Basic

    The form class contained in D:\Chapter3\Hello1.frm is not supported in VBE. The file can't be loaded
    Ahhh... you are trying to load a form. Forms are difficult to translate from VB to VBE; a form is the interface to your VB program, whilst in VBE the interface is the application (Excel, Word, etc).
    What you need to do is copy the event procedures behind the controls on the form, create your own form in Excel with the same controls on it (same names too) and then paste the event procedures into your Excel form. Sounds complicated... it could be, and it may not completely work!

  17. #17
    Time Lord Member The_Doctor's Avatar
    Join Date
    Oct 2004
    Location
    The TARDIS
    Posts
    2,040

    Default Re: Learning Visual Basic

    I will try that, thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO