View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jonjoyceUK@gmail.com is offline
external usenet poster
 
Posts: 2
Default Excel VBA putting text from textbox into SQL statement

Hi all, I have an SQL statement which I would like to have a variable
"WHERE" section. For example:

SELECT blah blah blah
WHERE DATA = variabledata.text


(where the variabledata.text is text from a text box.) Is this possible
to do?

Basically, the spreadsheet opens and asks for a "period" which is a
number between 1 and 3. The user then puts this into the inputbox and I
want that text to go into the variabledata.text part of the statement.

I hope this is enough info!

Any help is much appretiated,

Regards,

Jon.