Better one

Discussion in 'Scripting' started by Gene Magerr, Sep 10, 2010.

  1. Gene Magerr

    Gene Magerr Guest

    const xlValidAlertStop = 1
    const xlBetween = 1
    const xlValidateList = 3

    set objXls = CreateObject("Excel.Application")
    objXls.Visible = True

    set wrkBook = objXls.Workbooks.add()
    set wrkSheet = wrkBook.Worksheets(1)

    wrkSheet.Range("A65535") = "Yes"
    wrkSheet.Range("A65536") = "No"

    set tmp = wrkSheet.Range("A65535:A65536")
    set RowRange = wrkSheet.Range("A1")
    'RowRange.Interior.ColorIndex = 5

    With RowRange.Validation
    ..Add xlValidateList, xlValidAlertStop, xlBetween, "=$A$65535:$A$65536"
    ..InCellDropdown = True

    End With

    Submitted via EggHeadCafe - Software Developer Portal of Choice
    Simple .NET HEX PixelColor Utility
    Gene Magerr, Sep 10, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.