Hale, Jim
Jim.Hale at FleetPride.com
Thu Dec 14 11:35:06 CST 2006
Here they are Jim Hale Private Function RangeNameExists(nname) As Boolean ' Returns TRUE if the range name exists Dim n As Excel.Name RangeNameExists = False For Each n In appXcel.ActiveWorkbook.Names If UCase(n.Name) = UCase(nname) Then RangeNameExists = True Exit Function End If Next n Set n = Nothing End Function Private Function SheetExists(sname) As Boolean ' Returns TRUE if sheet exists in the active workbook Dim obj As Object On Error Resume Next Set obj = appXcel.ActiveWorkbook.Sheets(sname) If Err = 0 Then SheetExists = True _ Else SheetExists = False Set obj = Nothing End Function -----Original Message----- From: Reuben Cummings [mailto:reuben at gfconsultants.com] Sent: Thursday, December 14, 2006 11:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Export data from query to Excel Thanks, Jim. I would like to have SheetExists and rangeNameExists. This is something that will benefit me greatly if I keep even half to work I have now in this field. Reuben Cummings GFC, LLC 812.523.1017 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.