Results 1 to 6 of 6

Thread: Turn Excel Macro to Standalone App/script

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    58

    Turn Excel Macro to Standalone App/script

    So I have a macro here that will copy some information from a spreadsheet to an access database.
    I want to change it so it is its own file, and when run the user is asked what spreadsheet they want to export to the database.
    I will need to include the "Microsoft DAO 3.6 Object Library" (currently I have it checked off under references)

    I have installed Microsoft visual basic 2008 express, and pasted my code in there but there are lots of "undeclared" office functions / objects like:
    Application
    Excel
    ActiveWorkbook
    Database
    OpenDatabase
    dbOpenTable
    Range
    Worksheet

    what would I need to import to get access to these things?

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Turn Excel Macro to Standalone App/script

    Welcome to the forums...

    Microsoft Visual Basic 2008 was published after vb6. And it is commonly known as VB.Net. Which is different from the VBA(that's your case) and VB6...!

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    58

    Re: Turn Excel Macro to Standalone App/script

    Quote Originally Posted by akhileshbc View Post
    Welcome to the forums...

    Microsoft Visual Basic 2008 was published after vb6. And it is commonly known as VB.Net. Which is different from the VBA(that's your case) and VB6...!
    So you are saying that I shouldn't be using Visual Basic 2008 or VB6? If that is the case what can I use?

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Turn Excel Macro to Standalone App/script

    If you have good knowledge in VBA, then you could do it in VB6....! But VB6 is out of date. VB.Net is the latest version that Microsoft is supporting. You could do it either in VB or VB.Net...!
    If you are going with VB.Net then, you have to ask a mod to move this thread to the Vb.Net section of this forum. You have currently posted your question in Vb6 and earlier section.

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    58

    Re: Turn Excel Macro to Standalone App/script

    Ok, thanks, will try that.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Turn Excel Macro to Standalone App/script

    Moved To VB.NET

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