Results 1 to 3 of 3

Thread: Noob: Migration Advice (long)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2011
    Posts
    1

    Noob: Migration Advice (long)

    Hi all. Got what will seem like an unusual situation: almost no Windows experience, and an severely limited target user.

    Basically I've been using VBA in Office 2007 to do some database stuff, data crunching, XML stuff, etc. I've been making little worksheets and macros on my own time, after work, and frankly haven't been learning much about Windows development in general.

    No problem there, really, as long as I don't need to use any tool or development stuff that's not already installed on the machine. Yes, our IT department is that rigid. and pretty much staffed by people with no IT background. Hence, if it's not in our corporate installation, it doesn't exist. (I know that there are some add-ons that I can use in Excel like the RegEx object, so some minor mods can be possbile...). This is a tech-phobic company.

    Up til now I've been okay with that. However I've been getting to the point where the lack of features like exception handling is bothering me, a lot.

    Apparently I'm stuck with the VBA On On Error Goto, and (to my knowledge) can't implement an error-handling system that I like. (BTW, is there a way to pass a goto label as a variable to a function? Or are there preprocessor macros?).

    Now VB.net seems to have all the features I want, such as exception handling, and inheritance, and so forth. However, I'm unsure has to how to develop and/or distribute anything in VB.net with our setup.

    At home my Macs (yes, I'm from that side) have Windows running in a virtual box ready to go. Is it possible for me to develop in VB.net at home (via Visual Studio?) and make worksheets that I can run at work with our limited Office users? It seems like I would have to create some kind of external application in VB.net that would communicate with Excel (?) but I don't know if it's possible, or how to check for the capabilities I need.

    Also, is the Mac version of Office relevant at all to this?

    T-I-A

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: Noob: Migration Advice (long)

    As for the On Error Goto statement in VBA, you can equate it to a crude Try .. Catch block, where the Goto label makes up your Catch block.

    Code:
    Try
        'Code
        'Code
    Catch (Ex As Exception)
        'Error Handling
    End Try
    Code:
    On Error Goto Err
    'Code
    'Code
    Err:
    If Error.Number <> 0 Then
        'Error Handling
    End If
    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Noob: Migration Advice (long)

    You can automate Excel from VB.NET. And if you keep it simple (stay away from 3rd party controls, just use the intrinsic windows controls) you will not even need a setup. You can just copy and paste the exe if the framework is equivalent.

    The only part I'm not sure on is using Excel. I don't know if you would have to do any setup for it, but I wrote an app here that creates a spreadsheet in Excel that gets data from a database. I don't think I created a setup for that, but I don't remember.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width