+ Reply to Thread
Results 1 to 3 of 3

Old Format or Invalid Type Library

  1. #1
    David
    Guest

    Old Format or Invalid Type Library

    Essentially, I'm trying to update the validation on a drop-down list.

    Initially, the following code generated an Application error whenever I used
    'range().select'. I've now removed this line, but the file seems to have
    corrupted or something, such that any attempts to run other functions in the
    project produce 'Old Format or Invalid Type Library' errors whenever I call
    such fundamental things as the .usedrange attribute of the worksheet. This
    now happens in all the other code in the project!

    Function checkValidation(ByRef outstring As String)

    Dim x As String
    On Error Resume Next

    x = Sheets("Criteria Report").Range("OGC_Owner").Validation.Formula1
    Application.Goto ActiveSheet.Range("A1")
    Application.Goto Reference:="OGC_Owner"

    If Err.Number = 0 Then
    'validation exists
    ActiveCell.Validation.Delete
    End If

    On Error GoTo 0

    Sheets("Criteria Report").Range("OGC_Owner").Validation.Add
    Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween,
    Formula1:=outstring

    End Function


    I appreciate that there's a few different problems here, but any
    recommendations gratefully appreciated!

    David


  2. #2
    David
    Guest

    RE: Old Format or Invalid Type Library

    Also, I've searched around on messageboards for this error message, and it
    seem to be referenced as a .NET or C++ error, but I'm not using either of
    those!

  3. #3
    Bob Phillips
    Guest

    Re: Old Format or Invalid Type Library

    I would check that you don't have any Missing references. In the VBIDE, goto
    Tools>References, uncheck anything that has MISSING in it.

    --

    HTH

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


    "David" <[email protected]> wrote in message
    news:[email protected]...
    > Essentially, I'm trying to update the validation on a drop-down list.
    >
    > Initially, the following code generated an Application error whenever I

    used
    > 'range().select'. I've now removed this line, but the file seems to have
    > corrupted or something, such that any attempts to run other functions in

    the
    > project produce 'Old Format or Invalid Type Library' errors whenever I

    call
    > such fundamental things as the .usedrange attribute of the worksheet. This
    > now happens in all the other code in the project!
    >
    > Function checkValidation(ByRef outstring As String)
    >
    > Dim x As String
    > On Error Resume Next
    >
    > x = Sheets("Criteria Report").Range("OGC_Owner").Validation.Formula1
    > Application.Goto ActiveSheet.Range("A1")
    > Application.Goto Reference:="OGC_Owner"
    >
    > If Err.Number = 0 Then
    > 'validation exists
    > ActiveCell.Validation.Delete
    > End If
    >
    > On Error GoTo 0
    >
    > Sheets("Criteria Report").Range("OGC_Owner").Validation.Add
    > Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween,
    > Formula1:=outstring
    >
    > End Function
    >
    >
    > I appreciate that there's a few different problems here, but any
    > recommendations gratefully appreciated!
    >
    > David
    >




+ 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