Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default add method of validation failing

and i can't figure out why...

cells in range j15: j20 contan test values 12,34,56,78...


Private Sub CommandButton1_Click()
With Range("J24")
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
With .Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertWarning,
Operator _
:=xlBetween, Formula1:="=$j$15:$j$20"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "lit title"
.ErrorTitle = "waninng title"
.InputMessage = "input message"
.ErrorMessage = "warning messge"
.ShowInput = True
.ShowError = True
End With
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default add method of validation failing

Worked fine for me.

Doesn't even use a worksheet id to throw suspicion on. What is the command
button, form or control toolbox.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"mark kubicki" wrote in message
...
and i can't figure out why...

cells in range j15: j20 contan test values 12,34,56,78...


Private Sub CommandButton1_Click()
With Range("J24")
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
With .Validation
.Delete
.Add Type:=xlValidateList,

AlertStyle:=xlValidAlertWarning,
Operator _
:=xlBetween, Formula1:="=$j$15:$j$20"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "lit title"
.ErrorTitle = "waninng title"
.InputMessage = "input message"
.ErrorMessage = "warning messge"
.ShowInput = True
.ShowError = True
End With
End With
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default add method of validation failing

post youir responce, I re-created it in a macro, copied it into code, and it
worked !!!
then it didn't
the command button is just a standard command button (created thru the
toolbox) on a worksheet; I added it to test the code with...

-mark




"Bob Phillips" wrote in message
...
Worked fine for me.

Doesn't even use a worksheet id to throw suspicion on. What is the command
button, form or control toolbox.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"mark kubicki" wrote in message
...
and i can't figure out why...

cells in range j15: j20 contan test values 12,34,56,78...


Private Sub CommandButton1_Click()
With Range("J24")
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
With .Validation
.Delete
.Add Type:=xlValidateList,

AlertStyle:=xlValidAlertWarning,
Operator _
:=xlBetween, Formula1:="=$j$15:$j$20"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "lit title"
.ErrorTitle = "waninng title"
.InputMessage = "input message"
.ErrorMessage = "warning messge"
.ShowInput = True
.ShowError = True
End With
End With
End Sub






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
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method Add of object Validation Failed - please help Shokie Excel Worksheet Functions 1 July 10th 09 01:33 PM
Failing IF Statement Jemsilve Excel Discussion (Misc queries) 2 November 9th 07 09:23 PM
Data validation, cell protection or other method? KG Excel Discussion (Misc queries) 5 June 17th 05 05:22 AM
Macro failing Syd[_3_] Excel Programming 0 September 17th 03 02:51 PM


All times are GMT +1. The time now is 06:34 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"