|
-
Jul 19th, 2004, 07:44 AM
#1
Thread Starter
New Member
VBA interference between applications?
Hi everyone. I'm brand new here. I am a very casual VB user and I am looking forward to learning a lot here.
I have been using VBA in Excel, and I recently started using VBA in another low volume specialized program. My question is: Is there just one VBA program that is shared among all programs that use VBA? How much interference is there? Is there some restriction on using only one at a time? I'm using VBA 6.3 on XP Pro.
The reason I'm asking is that I swear I saw some strange results from this other program while a computationally-intensive (100% CPU usage) Excel macro was running.
Thanks for any help.
Last edited by Ralphy; Jul 19th, 2004 at 01:48 PM.
-
Jul 20th, 2004, 02:57 AM
#2
Addicted Member
using VBA in another low volume specialized program.
No can do - and this, in effect, answers your query.
You are probably using Visual Basic not Visual Basic for Applications. VBA is a cut down version of VB used solely with the Microsoft Office range of applications (although it can be stretched a bit to emulate keyboard entries in others). eg. Excel, Word etc.
Unless your queries relate specifically to these applications you would probably be better posting on the Visual Basic message board.
Regards
BrianB
-------------------------------
-
Jul 20th, 2004, 03:17 PM
#3
Thread Starter
New Member
Thanks, BrianB. So is there any possibility of interference between VBA and VB?
-
Jul 22nd, 2004, 07:40 PM
#4
You can automate office applications by using COM.
Very basic example.
In VB...
VB Code:
Option Explicit
'Add a reference to MS Excel xx.x
'Add a command button Command1
Private moXL as Excel.Application
Private Sub Command1_Click()
Set moXL = New Excel.Application
moXL.Visible = True
moXL.WorkBooks.Add
'...
End Sub
HTH
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 
-
Jul 23rd, 2004, 09:21 AM
#5
Addicted Member
interference between VBA and VB ?
You would tend to use only one or the other. VB for standalone .exe - VBA only runs from within an MS Office application.
Regards
BrianB
-------------------------------
-
Jul 23rd, 2004, 02:45 PM
#6
Thread Starter
New Member
Actually I found out that the low volume application does have VBA built-in. So my original question stands - what about Word vs. Excel, for instance?
-
Jul 26th, 2004, 03:50 AM
#7
Addicted Member
what about Word vs. Excel, for instance?
As MS Office applications (along with Access, Powerpoint etc.) VBA is run from within code modules attached to the files. We use CreateObject from within these apps. to run another of the Office applications.
VBA is part of MS Office -so no need to buy another application.
Visual Basic can also be used to run them, but you have to use CreateObject from the start to create an instance of the Office application. We have to purchase this separately.
I am using Excel all the time anyway, with and without code, and so would not wish to do anything with VB. I might consider using VB if I had to make a standalone application - when I believe that it is possible to supply to people who do not possess the MS Office applications. Not sure about this though.
Hope these comments help.
Regards
BrianB
-------------------------------
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
|