Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing excel cell values as sql variables

Hi,
Is there anyway I can pass excel cell values as sql variables???

Regards

Jaideep

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Passing excel cell values as sql variables

sSQL = "SELECT * FROM myTable WHERE id='" & Range("A1").Value & "'"

as I have assumed the id is a string, I have enclosed it in single quotes.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"jai" wrote in message
ps.com...
Hi,
Is there anyway I can pass excel cell values as sql variables???

Regards

Jaideep



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Passing excel cell values as sql variables

Hi

I this is for use in MSQuery, then Nick Hodge has a great article he

http://www.dailydoseofexcel.com/arch...-data-queries/

Best regards

Richard


jai wrote:
Hi,
Is there anyway I can pass excel cell values as sql variables???

Regards

Jaideep


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Passing excel cell values as sql variables

.... I this is for use in MSQuery ...

odd, I thought you were English <vbg

"RichardSchollar" wrote in message
oups.com...
Hi

I this is for use in MSQuery, then Nick Hodge has a great article he

http://www.dailydoseofexcel.com/arch...-data-queries/

Best regards

Richard



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Passing excel cell values as sql variables

It would seem that the copious quantities of mulled wine consumed this
Christmas have addled my brain ;-)

Richard hic...


Bob Phillips wrote:

... I this is for use in MSQuery ...

odd, I thought you were English <vbg

"RichardSchollar" wrote in message
oups.com...
Hi

I this is for use in MSQuery, then Nick Hodge has a great article he

http://www.dailydoseofexcel.com/arch...-data-queries/

Best regards

Richard


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Variables-Excel VBA trini Excel Programming 2 February 17th 05 07:05 PM
Passing cell addressess to variables to be use in range ExcelMonkey[_146_] Excel Programming 2 June 11th 04 09:31 PM
Passing Excel formats in VBA date variables ExcelMonkey[_54_] Excel Programming 3 January 31st 04 10:40 PM
Passing Variables Royce[_2_] Excel Programming 1 November 20th 03 02:16 PM
passing variables from excel to word Mike NG Excel Programming 8 July 22nd 03 12:08 PM


All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"