PC Review


Reply
Thread Tools Rate Thread

Data Validation error

 
 
Lico_VBA
Guest
Posts: n/a
 
      13th Sep 2008
when i recorded this macro the excel displayed the list normally, but when i
execute this code then excel shows one line in the list with "a;b;c".

Does anyone knows how to make excel display three lines ( "a" , "b", "c")?

Sub Macro2()
' Macro2 Macro
'
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="a;b;c"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub



 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      13th Sep 2008
Change the semi-colons ( to commas...

...,Formula1:="a,b,c"

--
Rick (MVP - Excel)


"Lico_VBA" <(E-Mail Removed)> wrote in message
news:994C5479-D2C3-488A-B28F-(E-Mail Removed)...
> when i recorded this macro the excel displayed the list normally, but when
> i
> execute this code then excel shows one line in the list with "a;b;c".
>
> Does anyone knows how to make excel display three lines ( "a" , "b", "c")?
>
> Sub Macro2()
> ' Macro2 Macro
> '
> With Selection.Validation
> .Delete
> .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
> _
> xlBetween, Formula1:="a;b;c"
> .IgnoreBlank = True
> .InCellDropdown = True
> .InputTitle = ""
> .ErrorTitle = ""
> .InputMessage = ""
> .ErrorMessage = ""
> .ShowInput = True
> .ShowError = True
> End With
> End Sub
>
>
>


 
Reply With Quote
 
Doug Glancy
Guest
Posts: n/a
 
      13th Sep 2008
Change your semicolons to commas:

xlBetween, Formula1:="a,b,c"

hth,

Doug

"Lico_VBA" <(E-Mail Removed)> wrote in message
news:994C5479-D2C3-488A-B28F-(E-Mail Removed)...
> when i recorded this macro the excel displayed the list normally, but when
> i
> execute this code then excel shows one line in the list with "a;b;c".
>
> Does anyone knows how to make excel display three lines ( "a" , "b", "c")?
>
> Sub Macro2()
> ' Macro2 Macro
> '
> With Selection.Validation
> .Delete
> .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
> _
> xlBetween, Formula1:="a;b;c"
> .IgnoreBlank = True
> .InCellDropdown = True
> .InputTitle = ""
> .ErrorTitle = ""
> .InputMessage = ""
> .ErrorMessage = ""
> .ShowInput = True
> .ShowError = True
> End With
> End Sub
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation Error CH Microsoft Excel Misc 1 26th Jan 2010 07:59 PM
Data Validation error Kristen Microsoft Excel Misc 2 7th Feb 2008 02:36 PM
When pasting data into a column with data validation I lose validation check Brad Microsoft Excel Misc 5 17th Apr 2004 01:11 PM
Re: Data Validation Error! keepitcool Microsoft Excel Programming 2 19th Aug 2003 12:23 PM
error with data validation Claude Microsoft Excel Programming 1 21st Jul 2003 11:02 AM


Features
 

Advertising
 

Newsgroups
 


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