The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Visual Basic?

RhinoRhino TheRhinLOLRegistered User regular
edited July 2007 in Help / Advice Forum
I want to create some wizbang sweet Excel Macros. Visual Basic the "best" way to do this? Anyone know a good visual basic book?

EDIT: Microsoft has a lot of new "stuff" out, would it be better to learn C# or something like that? Mono, asp, .net?

93mb4.jpg
Rhino on

Posts

  • whuppinswhuppins Registered User regular
    edited July 2007
    Excel macros are done in VBA, which is essentially the same as VB.

    Bonus tip: If all you care about is learning to make macros for Excel, the best way to learn is to record a series of actions with the Macro tool, then open up the VBA editor and see the code that the program actually hammered out when you did the recording. Between that and the built-in help feature, I've become pretty good at Excel VBA without having to refer to any books or other outside resources.

    whuppins on
  • RhinoRhino TheRhinLOL Registered User regular
    edited July 2007
    thanks.

    Basically the first macro I need to write has to do this:

    1. Download xml file from http
    2. parse xml file
    3. display results in excel cells
    4. goto 1 after X amount of seconds (seconds are stored in a cell)

    So basically just continuously updating the data.

    Second part of program would be to:
    1. take values from excel cells
    2. parse them and format them into xml
    3. send xml data to http
    4. 1 though 3 is "executed" by putting values into cell and then hitting a button.

    Rhino on
    93mb4.jpg
  • whuppinswhuppins Registered User regular
    edited July 2007
    Unless you're querying a database through ODBC, not a whole lot of remote file operations can be automated through Excel VBA. The download bit can probably work (perhaps with an extra click or two) but I'm not sure how I'd go about uploading the data. All the other xml reading and writing bits are very doable, though. I've done some projects that are similar (parsing text/HTML files into Excel and vice versa), so I may be able to help. Shoot me a PM if you want, though I'm not a pro -- Excel is just a hobby of mine.

    If you want some good sources on Excel automation, stop by XL Logic, which is probably the #1 resource for that kind of stuff. Lots of good tutorials, code samples, and other info there.

    whuppins on
  • blincolnblincoln Registered User regular
    edited July 2007
    It's important to keep in mind that the VBA in Office is based on VB <= 6, *not* VB.NET, which is very different.

    Can you be more specific about what you're trying to do? Why are you sticking Excel in the middle instead of doing everything in a web application?

    blincoln on
    Legacy of Kain: The Lost Worlds
    http://www.thelostworlds.net/
  • PheezerPheezer Registered User, ClubPA regular
    edited July 2007
    The best way to do this I think would be to download VB.NET Express Edition from MS, and code something that automates IE to download the XML files, and then automates Excel to process them.

    If you've never done any programming before, you can probably figure this out on your own in about two or three months of hard work if you're fairly bright.

    Pheezer on
    IT'S GOT ME REACHING IN MY POCKET IT'S GOT ME FORKING OVER CASH
    CUZ THERE'S SOMETHING IN THE MIDDLE AND IT'S GIVING ME A RASH
Sign In or Register to comment.