Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Validataion listbox

Hi Guys



Trying to make it simple



I have a sql table with say 6 entries in

ie

Ben

Bob

Fred
Guy

Tony

Garry



I have created a connection and recordset to the sql using vb 2005



on double click I would like to create an excel validation which consists of
these entries

so the user can only select these choices for lets say for all column A



HAs any one got any ideas on how to achieve this?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Excel Validataion listbox

Hi,

Use data menu, Validation

With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
_
xlBetween, Formula1:="Greg;Bob;etc"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Regards
JY
"strictlydata" wrote in message
...
Hi Guys



Trying to make it simple



I have a sql table with say 6 entries in

ie

Ben

Bob

Fred
Guy

Tony

Garry



I have created a connection and recordset to the sql using vb 2005



on double click I would like to create an excel validation which consists
of
these entries

so the user can only select these choices for lets say for all column A



HAs any one got any ideas on how to achieve this?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel Validataion listbox

Enter the list anywhere in the same sheet (at IU1). Select the cell where you
want the validated list.
Go to Data, Validation. Under Allow select list which will prompt you to
select the list and now you can select the list of names entered in IU1

"strictlydata" wrote:

Hi Guys



Trying to make it simple



I have a sql table with say 6 entries in

ie

Ben

Bob

Fred
Guy

Tony

Garry



I have created a connection and recordset to the sql using vb 2005



on double click I would like to create an excel validation which consists of
these entries

so the user can only select these choices for lets say for all column A



HAs any one got any ideas on how to achieve this?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Validataion listbox

Thank you both for your replies

The problem is the data changes so I don't want the validation to be static
I would like the data to be read from sql everytime the validation is used.

Thanks


--
1


"sacrame" wrote:

Enter the list anywhere in the same sheet (at IU1). Select the cell where you
want the validated list.
Go to Data, Validation. Under Allow select list which will prompt you to
select the list and now you can select the list of names entered in IU1

"strictlydata" wrote:

Hi Guys



Trying to make it simple



I have a sql table with say 6 entries in

ie

Ben

Bob

Fred
Guy

Tony

Garry



I have created a connection and recordset to the sql using vb 2005



on double click I would like to create an excel validation which consists of
these entries

so the user can only select these choices for lets say for all column A



HAs any one got any ideas on how to achieve this?


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
Can the source in data validataion be located in another sheet? trainer07 Excel Discussion (Misc queries) 2 May 10th 07 11:06 PM
Resize Validataion Message Help! dee Excel Discussion (Misc queries) 3 May 9th 07 09:15 PM
userform listbox cannot get listbox.value to transfer back to main sub [email protected] Excel Programming 1 May 17th 06 09:44 PM
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) modjoe23 Excel Programming 3 August 18th 05 02:35 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 10:29 PM.

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"