[dba-VB] CreateObject, GetObject Functions

Adam Borrie AdamB at peabody.org.uk
Thu May 13 08:54:12 CDT 2004


there is a PrevInstance property.  Rather than me explain it, check out the
online Help, it will make more sense than have me try to explain it.
Adam Borrie
Systems Manager
Peabody Trust
*  0207 021 4439
* adamb at peabody.org.uk

> ----------
> From:
> bkollodge at parkindustries.com[SMTP:bkollodge at parkindustries.com]
> Reply To: 	dba-vb at databaseadvisors.com
> Sent: 	13 May 2004 14:44
> To: 	dba-vb at databaseadvisors.com
> Subject: 	RE: [dba-VB] CreateObject, GetObject Functions
> 
> What would you change "Excel.Application" to if I wanted to see if
> MyVBApp.exe was already running?
> 
> Thanks,
> Bill
> 
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie
> Sent: May 13, 2004 8:42
> To: 'dba-vb at databaseadvisors.com'
> Subject: RE: [dba-VB] CreateObject, GetObject Functions
> 
> 
> Bryan you're a star!
> 
> I had just come to the conclusion that I would have to error trap it, so
> thanks for the code.
> 
> Adam Borrie
> Systems Manager
> Peabody Trust
> *  0207 021 4439
> * adamb at peabody.org.uk
> 
> > ----------
> > From: 	Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca]
> > Reply To: 	dba-vb at databaseadvisors.com
> > Sent: 	13 May 2004 14:18
> > To: 	dba-vb at databaseadvisors.com
> > Subject: 	Re: [dba-VB] CreateObject, GetObject Functions
> > 
> > Adam,
> > 
> > Here is how I deal with this:
> > 
> >   'Temporarily disable error handling
> >   On Error Resume Next
> >   'Get a reference to an already open session on Excel
> >   Set objXL = GetObject(, "Excel.Application")
> >   'Check to see if everything is ok
> >   If objXL Is Nothing Then
> >     'Object is nothing, which means Excel is not open
> >     Set objXL = CreateObject("Excel.Application")
> >     bolWeLoaded = True
> >   End If
> >   
> >   'Restore proper error handling
> >   On Error GoTo cmdExcel_Click_Error
> > 
> > 
> > Bryan Carbonnell
> > bryan_carbonnell at cbc.ca
> > 
> > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>>
> > Question:
> > 
> > I am trying to set the value of a Boolean variable on the basis of 
> > whether an instance of Excel is running.  In doing this I can then 
> > determine whether
> > to perform a CreateObject or GetObject function.
> > 
> > Do any of you have any suggestions. 
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> > 
> 
> ########################################################################
> #############
> This e-mail message has been scanned for Viruses and Content and cleared
> 
> by MailMarshal
> For more information please visit www.marshalsoftware.com
> ########################################################################
> #############
> 
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual to whom it is addressed.
> Any views or 
> opinions presented are solely those of the author and do not necessarily
> 
> represent those of the Peabody Trust.
> 
> If you are not the intended recipient, be advised that you have received
> this 
> email in error and that any use, dissemination, forwarding, printing, or
> 
> copying of this email is strictly prohibited. If you have received this
> email 
> in error please notify the Peabody Trust IT Help Desk either by;
> 
> Emailing helpdesk at peabody.org.uk 
> 
> Or by telephone on 020 79287811
> 
> Peabody Trust - http://www.peabody.org.uk
> 
> Please note that Peabody Trust encorporates  Waltham Forest Community
> Based Housing Association and Safe in the City.
> 
> This footnote also confirms that MailMarshal and Network Associates
> Total 
> Virus Defense software's have swept this email message for the presence
> of 
> computer viruses http://www.marshalsoftware.com and http://www.nai.com
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 
> 
> This Communication is for use by the intended recipient and contains
> information that may be privileged, confidential or copyrighted under
> applicable law.  If you are not the intended recipient, you are hereby
> formally notified that any use, copying or distribution of the e-mail, in
> whole or in part, is strictly prohibited.  Please notify the sender by
> return e-mail and delete this e-mail from your system.  This e-mail does
> not constitute consent to the use of the sender's contact information for
> direct marketing purposes or for transfers of data to third parties.
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
For more information please visit www.marshalsoftware.com
#####################################################################################

This email and any files transmitted with it are confidential and intended
solely for the use of the individual to whom it is addressed. Any views or 
opinions presented are solely those of the author and do not necessarily 
represent those of the Peabody Trust.

If you are not the intended recipient, be advised that you have received this 
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited. If you have received this email 
in error please notify the Peabody Trust IT Help Desk either by;

Emailing helpdesk at peabody.org.uk 

Or by telephone on 020 79287811

Peabody Trust - http://www.peabody.org.uk

Please note that Peabody Trust encorporates  Waltham Forest Community Based Housing Association and Safe in the City.

This footnote also confirms that MailMarshal and Network Associates Total 
Virus Defense software's have swept this email message for the presence of 
computer viruses http://www.marshalsoftware.com and http://www.nai.com



More information about the dba-VB mailing list