Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SELECT stmt using a range name?

I have a UserForm which utilizes a section of a worksheet as a
datatable. The form navigates through the records forward and back,
can add new records and edit existing ones. The procedure first
deletes an old range name and creates a new name based on todays total
records.
I have added a listbox wherein I would like to display other records in
the same range which match the content of a text box control on the
same form.
In Access I would use a simple SELECT (fields) FROM (table) WHERE
(field = x). to construct a stmt for the RowSource for the new
listbox. I've tried using Column references for the SELECT as well as
Column Headings and the range name for the FROM. I can't seem to get
anything to work. Any suggestions from anyone??



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SELECT stmt using a range name?

You could try :data :template wizard if it helps to solve
your problem
-----Original Message-----
I have a UserForm which utilizes a section of a worksheet

as a
datatable. The form navigates through the records forward

and back,
can add new records and edit existing ones. The

procedure first
deletes an old range name and creates a new name based on

todays total
records.
I have added a listbox wherein I would like to display

other records in
the same range which match the content of a text box

control on the
same form.
In Access I would use a simple SELECT (fields) FROM

(table) WHERE
(field = x). to construct a stmt for the RowSource for

the new
listbox. I've tried using Column references for the

SELECT as well as
Column Headings and the range name for the FROM. I can't

seem to get
anything to work. Any suggestions from anyone??



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.

ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default SELECT stmt using a range name?

what.. are you complaining that excel isnt a database?
<grin


afaik you cant use ADO recordsets with rowsource...
you'll have to read the values to the listbox.list

which wouldnt be a problem for you as it's display only.

for lots of info on working with ado recordsets
http://www.erlandsendata.no/english/...php?t=envbadac

or from the same guru:
http://www.exceltip.com/show_tip/User_Forms,
_Input_boxes_in_VBA/Fill_a_ListBox-
control_with_values_from_another_workbook_using_VB A_in_Microsoft_Excel/4
10.html

suc6!



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


mcdowell wrote:

I have a UserForm which utilizes a section of a worksheet as a
datatable. The form navigates through the records forward and back,
can add new records and edit existing ones. The procedure first
deletes an old range name and creates a new name based on todays total
records.
I have added a listbox wherein I would like to display other records

in
the same range which match the content of a text box control on the
same form.
In Access I would use a simple SELECT (fields) FROM (table) WHERE
(field = x). to construct a stmt for the RowSource for the new
listbox. I've tried using Column references for the SELECT as well as
Column Headings and the range name for the FROM. I can't seem to get
anything to work. Any suggestions from anyone??



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/


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
LOOKUP or IF-THEN stmt - which one? JessP27 Excel Worksheet Functions 8 June 1st 09 04:51 PM
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
Rounding down from .9 in an IF stmt GenaM Excel Worksheet Functions 1 August 2nd 06 11:16 PM
URGENT need help with if/then stmt. Melissa H. Excel Worksheet Functions 4 October 26th 05 10:08 PM


All times are GMT +1. The time now is 10:32 AM.

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

About Us

"It's about Microsoft Excel"