Results 1 to 4 of 4

Thread: Need help converting Excel table of values to VB

  1. #1
    Guest

    Post

    I have this Excel program that has a huge table of values that are based on user input and engineering formulas. Does anyone know how I can convert this table into VB or how I can have VB use these values? I think the main problem with this is the fact that these numbers in the table change every time the user inputs something into the program. Anyway, I basically need all of this Excel program in the VB environment so that other people can't see the code like they can in Excel. Please help if you can

    Thanks, Melissa


  2. #2
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290

    Post

    Depending on the size of the file, you might want to use arrays to pick up the Excel information.

    Set your Excel object references in the VB project, then start at a given cell to pick up the arrays. I use loops to pick up the information. Once it is in the array, you need to know where to find it in the array.

    Another option would be to pick up the array and convert it to an Access table - then you could manipulate it with SQL.

  3. #3
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Post Don't switch to VB from Excel just yet.

    Hi Melissa,

    If your main problem is preventing users from seeing the Excel VBA code, you can password protect the modules. Here's how you do it:

    In the Excel VBA Editor Window, select Tools...VBAProject Properties. Then Click on the Protection Tab. Put a check by "Lock project for viewing" and type in a password. Click OK.

    Now your VB-Excel Code is password protected! In order to test if it worked, save and close the workbook, open it back and try to look at the Code.
    Hopefully, this will save you from having to try to read the Excel data into VB.

    All the best.

  4. #4
    Guest

    Post Thank You!

    BILLWAGNON...the size of the file is 550Kb and the tables are probably 225Kb. I thought I should use arrays...so, I will try your first suggestion. May take me a while to do this since I am new to coding! And, I don't know anything about SQL . So, thanks for your suggestion!
    ONESOURCE...The only problem with that is that we are trying to have a lot of our applications in Visual Basic, and especially not Excel. It's an eng. program that I really have no understanding of the purpose , and I would definitely love to leave it in Excel, but my boss doesn't agree! But, thanks so much for your help!

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