Charlotte Foust
cfoust at infostatsystems.com
Tue Apr 1 16:19:41 CST 2003
VB has a different VBA reference because VB is an engine all by itself. The other apps need a different library but the vanilla VBA stuff is the same. Only the object models are different. Charlotte Foust -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Tuesday, April 01, 2003 1:59 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] VBE Actually, I just checked, VB does have Visual Basic for Applications referenced, but it's a different .dll then my Office 2000 apps. VB is definitely different then VBA. They certainly have similarities, however there are distinct differences. Why would Word be at a loss to deal with it? Word certainly can't use an Access form within Word directly, but Word can run the same code within automation for an Access database. The only difference being that in Word, to manipulate Access and it's objects, you have to set a reference to, and create an Access object, where as in Access, that 'object' is already present, and set as the 'global' default. For instance: Dim Acc As Access.Application Set Acc = Application Acc.DoCmd.Quit The code above works just fine in Access. To make it work within Word or Excel, you just set Acc=New Access.Application The issue....VBA IS identical from Office App to Office App.....it's just a different object model (default). VB and VBA are not identical, just similar. And what is so tough about going from one app's object model to another? Do they not all share the same 'modeling' scheme? They all have properties, collections, events, and methods. It's only a matter of finding the appropriate one for what you need to do. Granted, for the first time it is going to take a bit longer then if you have been using that object model for years, but it shouldn't take THAT long! Drew -----Original Message----- From: Charlotte Foust [mailto:cfoust at infostatsystems.com] Sent: Tuesday, April 01, 2003 3:29 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] VBE Drew, You're being willfully dense! Yes, the VBA is the same language. It's also the same VBA that VB uses. That is not, and has never been, the point. There is not a whole heck of a lot that the vanilla VBA language can do to manipulate an Access nested subform, now is there? And Word would be at a loss to deal with it. Let's stick to the issue at least. Charlotte Foust -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Tuesday, April 01, 2003 1:09 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] VBE All I am saying is that VBA within any office program of the same 'generation' IS THE SAME VBA!!!!!!!!!!!!!!!!!!!!! Okay Charlotte. Open Access (whatever version you want). Go into the references and look at Visual Basic For Applications. Take a look at the location and file used for that reference. That reference IS VBA. Now open Word (same version). Again open your references......look at Visual Basic For Applications....surprise!!!! It's the same file. Maybe that's a fluke, let's try Excel. Let's look in the references........uh oh.....looks like the same file to me. Hold on a second. Access, Word and Excel aren't the only programs in the Office Suite. Let's try PowerPoint...oh man...it's the same .dll. Aha, let's try Outlook....hmmmmm....imagine that. Okay, I know I'm being a smart a55 <grin>, but do you get my point? Drew -----Original Message----- From: Charlotte Foust [mailto:cfoust at infostatsystems.com] Sent: Tuesday, April 01, 2003 2:32 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] VBE You're assuming that people *do* steer clear of learning VBA in another app, which is just as fallacious as claiming it's all the same thing. Charlotte Foust -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Tuesday, April 01, 2003 12:26 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] VBE Thank you Arthur. I was beginning to wonder if I was the only one that understood that! <Grin> I think that way too many people steer clear of learning VBA in another app, because they feel it is going to be a whole new ball game, when in fact, it's the same game, just in a different stadium! <evilgrin> Drew -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Tuesday, April 01, 2003 1:38 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] VBE No, Susan. The ephemera differ, but they all attempt to disorient you with centrifugal v. centriptal force and similar Physics 101 techniques, so as soon as you understand centrifugal v. centripital you have everything you need. Granted there are different objects in different hierarchies but so what? That's no deeper than different tables in the same database. That's IMO what Drew was suggesting, and IMO he is entirely correct. As opposed, for example, to taking some VBA code from whatever target you choose and porting it to Java or Python. "Those who would sacrifice liberty for security deserve neither." -- Benjamin Franklin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: April 1, 2003 11:20 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] VBE Drew, when you visit Disneyworld, you can ride dozens of rides, but none of them are the same -- even though you're still in Disneyworld. :) Susan H. > I know that, Drew. The point is that the object model is entirely > different, so aren't writing the same code at all, regardless of which > VBE you use. > > Charlotte Foust _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com