|
-
Feb 27th, 2007, 04:01 AM
#1
Thread Starter
Addicted Member
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:
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?
-
Feb 27th, 2007, 04:23 AM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Feb 27th, 2007, 04:25 AM
#3
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).
-
Feb 27th, 2007, 08:15 PM
#4
Thread Starter
Addicted Member
Re: List of properties and methods for Excel object
 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
-
Feb 27th, 2007, 08:25 PM
#5
Thread Starter
Addicted Member
Re: List of properties and methods for Excel object
 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?
-
Feb 27th, 2007, 09:06 PM
#6
Re: List of properties and methods for Excel object
-
Feb 27th, 2007, 10:06 PM
#7
Thread Starter
Addicted Member
Re: List of properties and methods for Excel object
 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?
-
Feb 28th, 2007, 12:16 AM
#8
Re: List of properties and methods for Excel object
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Feb 28th, 2007, 12:28 AM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|