Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Old Format or Invalid Type Library

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

--

HTH

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


"David" wrote in message
...
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
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
TYPE Library issues. shishi Excel Programming 1 August 19th 05 07:11 PM
Set a Reference to a Type Library Glen Mettler[_4_] Excel Programming 0 February 9th 05 03:27 PM
HELP:old format or invalid type library Iliopoulos Dimitris Excel Programming 0 June 2nd 04 06:01 PM
Why does this fail with an invalid type error Benkong2 Excel Programming 3 April 18th 04 01:59 PM
object library invalid succhu Excel Programming 0 March 2nd 04 05:21 PM


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