+ Reply to Thread
Results 1 to 3 of 3

add method of validation failing

  1. #1
    mark kubicki
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:%[email protected]...
    > 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. #3
    mark kubicki
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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" <[email protected]> wrote in message
    > news:%[email protected]...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1