View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
robs3131 robs3131 is offline
external usenet poster
 
Posts: 144
Default Eliminating bland from Data Validation list?

Hi,

I looked around other postings but could not find the answer -- what I'm
having a problem with is thta in my data validation list, I have a range set
(which refers to column H) -- the number within the range can change, and I
sort it every time it does change so that there are no spaces between values.


The problem is that there are numerous blanks in the list at bottom, after
the last actual value in the range. Is there any way to get rid of those
blanks? I tried deleting (delete shift up) all blank cells after the last
value and through the last cell (H65536), but this doesn't help. Below is my
code. Thanks!


With .Range("B2").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=dvrange"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Please select value"
.InputMessage = ""
.ErrorMessage = "Please select a value from the drop down menu."
.ShowInput = True
.ShowError = True
End With

--
Robert