Results 1 to 9 of 9

Thread: List of properties and methods for Excel object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    List of properties and methods for Excel object

    I am using late binding method to use Excel object in VB6. My problem is for code like
    VB Code:
    1. Set oXLBook = oXLApp.Workbooks.Add 'Add a new workbook
    is easy and well known but what about other complicated codes ? for example how do I set Header and Footer and etc.

    Basically I would like to know is there a way I can find out the list of properties or methods for Excel and how to use it?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: List of properties and methods for Excel object

    Look through the Object Browser (press F2 while in the VBA IDE). Another easy trick is to use Early Binding where you set a reference to Excel in your project. Write all your code and then remove the reference. This allows you to have the intellisense during debugging, etc. Then after removing the reference you will be back to Late Binding.
    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

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: List of properties and methods for Excel object

    One method is to record a Macro from within Excel, and view the resultant code created (Macros>Edit).

    You could start a recording, and then go thru the motions of adding a Header and Footer, stop recording and view the code.

    You can use that as a basis over in VB6.

    Alternatly, you could look at the VBA Methods/Properties/Functions etc on the MSDN web site (start with the MSDN link in my signature and navigate your way across to VBA (Visual Basic for Applications).

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    Re: List of properties and methods for Excel object

    Quote Originally Posted by Bruce Fox
    One method is to record a Macro from within Excel, and view the resultant code created (Macros>Edit).

    You could start a recording, and then go thru the motions of adding a Header and Footer, stop recording and view the code.

    You can use that as a basis over in VB6.

    Alternatly, you could look at the VBA Methods/Properties/Functions etc on the MSDN web site (start with the MSDN link in my signature and navigate your way across to VBA (Visual Basic for Applications).
    it sounds very interesting unfortunately I have never done any macro and no experience using it. Is macro easy and fast to learn? I guess I'll start picking up macro if it is worthed. Thanx

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    Re: List of properties and methods for Excel object

    Quote Originally Posted by RobDog888
    Look through the Object Browser (press F2 while in the VBA IDE). Another easy trick is to use Early Binding where you set a reference to Excel in your project. Write all your code and then remove the reference. This allows you to have the intellisense during debugging, etc. Then after removing the reference you will be back to Late Binding.
    Thanx Rob .. after few years coding in VB6 I realized now the use of F2 (object browser)

    I guess I'd be asking too much if there's any examples on how to use those "classes" and "members" huh?

  6. #6
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: List of properties and methods for Excel object


  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    138

    Re: List of properties and methods for Excel object

    Quote Originally Posted by leinad31
    After downloaded and extracted the file I get a script error whenever I try to browse the contents. Am I the only one facing that problem?

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: List of properties and methods for Excel object

    Just try the online version so no issues
    http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx
    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

  9. #9
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: List of properties and methods for Excel object

    Look for vbaxl10.chm in C:\Program Files\Microsoft Office\OFFICE11\1033 (unless you installed in another location) and double click the file.

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