View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Need help with form logic

Something like this?

With Worksheets("Sheet1").Range("H1")
.Validation.Delete
Select Case Listbox1.Value
Case "Sheet1":
.Validation.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Formula1:="=A1:A10"
Case "Sheet2":
.Validation.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Formula1:="=A1:A26"
'etc.
End Select
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jersey Guy" <Jersey wrote in message
...
I'm creating a FORM in EXCEL. In the form, the user will select a drop

down
list of 4 items, "Screen 1, Screen 2, Screen 3, Screen 4". When the select
which screen they want, I need to create a data entry field for them with
restrictions on the number of lines and characters per line. i.e. if they
select Screen 1, they receive a data entry field of 4 lines x 26

characters.
(i could use a character max if necessary as oppose to lines and

characters.
If they select Screen 2, they receive a data entry field of 2 lines x 12
characters, and so forth.

I've been playing with data validation and using IF statements trying to
pull from a sub worksheet, but to no avail. I'm not big on programming in
EXCEL or even know if this is possible. Any help would be appreciated.