Results 1 to 4 of 4

Thread: VB6 with excel file

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    1

    VB6 with excel file

    I'm a new programer, i'm writing a visual basic 6 project,

    but i can't control excel file data from visual basic 6 code project

    please help me.

    thank's

  2. #2
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: VB6 with excel file

    53050373;

    Welcome to VBForums:

    Unfortunately you posted your question in the wrong thread. This is the VB.Net thread.

    Maybe you should mark this thread Resolved and make a new posting in the VB 6.0 section.

    Or, maybe one of the Moderators will notice it and move it for you.

    Good Luck

  3. #3
    Lively Member
    Join Date
    Dec 2006
    Posts
    96

    Thumbs up Re: VB6 with excel file

    Code:
    'Add Reference to Microsoft Excel Object Library 
    
    Dim App_QA As Excel.Application
    Dim Wb_QA As Excel.Workbook
    Dim maxrow as Integer
    
    Set App_QA = New Excel.Application
    Set Wb_QA = App_QA.Workbooks.Open("Full Path of The Excel WorkBook")
    Wb_QA.Worksheets(Sheet1).Select
    
    maxrow = Wb_QA.ActiveSheet.UsedRange.Rows.Count
    'Now u can handle the Excel as v do it in VBA.

    Hope This will give u an idea...
    Rahul Yadav

    If your problem has been solved then please mark the thread [RESOLVED].
    If i have helped then please Rate my post

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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