Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2008, 03:20 PM
Registered User
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Statement with Excel

Hi everybody

I have been asked to "Create a contact Database" with obligation to use only Excel, not Access.

I manage 2 to 3000 records and I need to add selection function.

I read in Wrox book "VBA for Excel 2002" that I still could use ADO to query an Excel file. This works with some coding obligations ie

a simple SQL statement, once the ADO connection created, looks as follows:

StrSQL="Select * from [Data$a1:h1415]"

This is also written in this book that the 1st line is by default recognized as column names, this being very useful to create SQL statements with a WHERE clause.

I fail writing this WHERE clause and would urgently need some help since I have to provide my solution somewhere end of next week.

I would really appreciate your hints since I am slightly lost.

Great thanks in advance

 
Old May 23rd, 2008, 08:29 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Can you have a look at http://vbadud.blogspot.com/2008/05/u...-database.html

Cheers
Shasur

http://www.dotnetdud.blogspot.com

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with SQL Statement forumsUID SQL Server 2000 1 August 23rd, 2007 08:08 AM
convert a SQL Statement from MS Access to a SQL Corey Access 6 March 28th, 2007 12:33 PM
SQL Statement SAMBUSA SQL Language 2 December 1st, 2004 11:10 AM
Help with SQL statement acdsky SQL Language 3 June 18th, 2004 04:53 AM
SQL Statement stu9820 ASP.NET 1.0 and 1.1 Basics 1 September 30th, 2003 04:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.