|
-
Oct 15th, 2007, 06:44 PM
#1
Thread Starter
PowerPoster
[RESOLVED] vb6 controls in VBA
How can I use vb6 controls (msdatagrid for example) with VBA without having VB6 installed (get licensing error otherwise)?
Are there any similar grid controls for VBA available that are very cheap or free?
Last edited by Muddy; Nov 15th, 2007 at 08:53 AM.
Reason: resolved
-
Oct 15th, 2007, 08:04 PM
#2
Re: vb6 controls in VBA
If you click on the additional tools button on the toolbox you can "import" whatever controls you have registered on your system. You can also install the vb 6 runtime redistributable too as your VBA users will need it installed to view your userform if you plan on distributing it.
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 
-
Oct 19th, 2007, 05:01 PM
#3
Thread Starter
PowerPoster
Re: vb6 controls in VBA
Thanks for the response. The problem is that if you dont have VB6 on your machine you wont have an msdatagrid registered (the control will be there, but it will complain about no license and die if you try to use it).
I was hoping there might be a way to license those vb6 primitive controls that ship with VBA but not vb6.
-
Oct 19th, 2007, 05:33 PM
#4
Re: vb6 controls in VBA
You can register the control silently with the /s switch.
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 
-
Oct 19th, 2007, 05:42 PM
#5
Thread Starter
PowerPoster
Re: vb6 controls in VBA
 Originally Posted by RobDog888
You can register the control silently with the /s switch.
so this will solve the problem?
Start - Run - regsvr32.exe /s MSDATGRD.OCX
Im skeptical, but will get the person I am working with to try it (I haven't got a machine without VB6 installed)
The reason I am skeptical is that it is a design time licensing issue ... not a registration issue as far as I know. using regsvr.exe doesnt work (using no switches) so I dont understand why the silent switch would change anything.
Thanks for the response!
Last edited by Muddy; Oct 19th, 2007 at 05:51 PM.
-
Oct 19th, 2007, 11:52 PM
#6
Re: vb6 controls in VBA
The problem is that if you dont have VB6 on your machine you wont have an msdatagrid registered
Im going off of that statement as if you loaded the ocx and registered it then it would be logical that the licensing issue would disappear.
If having just the single ocx installed and registered wont prevent the licensing issue before you open Excel then perhaps installing the entire runtime redistributable would suffice?
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 
-
Nov 15th, 2007, 08:51 AM
#7
Thread Starter
PowerPoster
Re: vb6 controls in VBA
 Originally Posted by RobDog888
Im going off of that statement as if you loaded the ocx and registered it then it would be logical that the licensing issue would disappear.
If having just the single ocx installed and registered wont prevent the licensing issue before you open Excel then perhaps installing the entire runtime redistributable would suffice?
Turns out it's a licensing issue. without vb6 installed there is no design time license (although the runtime license exists) for the grid and it cannot be used in excel macros. I finally got what I needed by building a vb6 ocx wrapper with the props I needed.
Thanks for the responses!
-
Nov 15th, 2007, 12:48 PM
#8
Re: [RESOLVED] vb6 controls in VBA
Thanks for the update. Interesting issue though. Too bad MS just didnt allow the runtime controls to be used in VBA designers.
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 
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
|