locked
VB and Excel RRS feed

  • Question

  • Is it possible to read an excel column into a VB subscripted variable
    • Moved by Calvin_Gao Thursday, March 17, 2011 11:38 AM VB5 (From:Visual Basic General)
    • Moved by Calvin_Gao Thursday, March 17, 2011 11:38 AM VB5 (From:Visual Basic General)
    Friday, March 11, 2011 2:32 AM

All replies

  • Probably but are you asking this for Visual Basic for Net or for Visual Basic for Applicatians (VBA)

    The latest has its own forum

    http://social.msdn.microsoft.com/Forums/en-US/category/officedev


    Success
    Cor
    • Proposed as answer by TnTinMN Saturday, March 12, 2011 6:17 AM
    • Unproposed as answer by TnTinMN Saturday, March 12, 2011 6:17 AM
    Friday, March 11, 2011 8:47 AM
  • I'm using "Microsoft Visual Basic for 32 bit Development."  It references .net and VBA but doesn't say much in the help screens.  When I query for VB and Excel, I seem to get just the cases where VB is invoked from Excel.  I need to access the names from either Excel (or preferably SQL directly) so that I can filter out the lab results that don't belong to our division.  It clogs up our in-house system so someone (me) has to clean out the queue manually.  The VB process currently screen by Dr. name but it would add if I could screen by patient name also.  I am the administrator on the SQL and VB sides...I just need some help on the cross talk.  (I'm mostly MUMPS and Cache).  I'll figure it out eventually....I was just looking to save some time if someone has already done it.

    Thanx anyway :)

    Friday, March 11, 2011 9:21 PM
  • If you are invoking VB from Excel then you are probably talking VBA.

    Are you writing macro's in Excel ? or are you using a completely separate application from Excel to write you Visual Basic code (if so what folder is it in program Files  - Visual Studio 2008, Visual Studio 2010 ... )

    It could be either

    • VBA (if write VB code in Excel)
    • VB 1-6 (which would be older versions of VB)
    • VB.NET  (if version 2002 -> 2010)

    So you need to be specific about which version you are using because these forums only deal with the 3rd item.

     

     

     

    Friday, March 11, 2011 10:52 PM
  • Scotty,

     

    Thanx for the info.  Originally I was going to peek into the excel table from VB.  Now I am looking at grabbing directly from the SQL  where it originates from.

    As I dig more....I'm using VB-5.  I given up on the excel, I'm concentrating on getting the info directly from SQL.  This is interesting.  the code that should work doesn't...but mostly because my version of VB doesn't automatically load the libraries it needs to support the version of the code it references in the help screens.  I'm down to looking for the library that has OPENRECORDSET (I'm running on memory).  Little by little, I'll get there.

     

    Again, thanx.

     

     

    Monday, March 14, 2011 6:05 PM
  • "As I dig more....I'm using VB-5."

    This forum is for .NET, not other forms of basic.

    Renee


    Not a C officianado
    Monday, March 14, 2011 11:40 PM
  • If your using VB5 which may be the case with using recordsets

    You'll want to check out the following for alternative resources.

    http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b

    VB 1- 6 are an much older technology and have there own resouces

    These forums are for VB.NET products.

    Alternatively you could download VB Express (which is free) which is based upon .NET technology and bring you application into current version of VB, in which case this is the write place to ask questions..

    Monday, March 14, 2011 11:45 PM
  • Spotty, I appologize to you for misspellingyour name above.  Thank you for the reference above.  I'll try it and stop bothering you all.

    The title of the forum says Visual Basic General.  Maybe you should update the title of the forum to include ".NET".   I appologize to everyone for not being right up to the minute with technology.  You will probably roll over in your grave when I tell you I am still using my Tandy 1000 SX.  VB-5 and my PC work just fine.  I find part of the chase is being able to make it work.  I won't ever bother you again.  Thanx ?

     

    ciao

    Tuesday, March 15, 2011 2:34 PM
  • I'd double check you are talkin VB5 and Not VB2005.

    Are we talking something 5 years or 10 years old.

    If you can write code in VB then upgrading to VB.NET is the way to go, you much more likely to find solution and people able to help you.   Its free to download the express versions as well.

    Tuesday, March 15, 2011 4:09 PM
  • VB6 and VB5 have not been supported for a number of years. "VB General" now means .NET and the exclusion of VB5 and 6. They are different technologies.

    Renee


    Not a C officianado
    Wednesday, March 16, 2011 1:35 AM