Microsoft Visual Basic- compile error: can't find project or libra
- From: Noemi <Noemi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Aug 2007 17:56:47 -0700
Hi
I know there is alot of questions and answers regarding project and library
which I have read but I still get the same error.
I have the following code in my workbook when it first opens however when
someone who has an older version of excel trys to open the form I get the
above error.
Sub GetLibraryGUID()
Dim c As Byte
Dim myCheck As Long
Dim P As Boolean
Dim rng As Range
Dim i As Byte
c = ActiveWorkbook.VBProject.References.Count
On Error Resume Next
Dim Message, Title, Default, T As Single
If Active***.ProtectContents = True Then
P = True
Active***.Unprotect
Else
P = False
End If
Range(Cells(ActiveCell.Row, ActiveCell.Column), _
Cells(ActiveCell.Row + 3, ActiveCell.Column + 1)).Select
For Each rng In Selection.Cells
If Not IsEmpty(rng) Then
i = i + 1
End If
Next
Sheets("Sheet3").Select
Active***.Range("a1").Select
On Error Resume Next
ActiveCell.Value = "NAME :"
ActiveCell.Offset(1, 0).Value = "MAJOR :"
ActiveCell.Offset(2, 0).Value = "MINOR :"
ActiveCell.Offset(3, 0).Value = "GUID :"
ActiveCell.Offset(0, 1).Value = _
ActiveWorkbook.VBProject.References(T).Name
ActiveCell.Offset(1, 1).Value = _
ActiveWorkbook.VBProject.References.Item(T).Major
ActiveCell.Offset(2, 1).Value = _
ActiveWorkbook.VBProject.References.Item(T).Minor
ActiveCell.Offset(3, 1).Value = _
ActiveWorkbook.VBProject.References.Item(T).GUID
If P = True Then
Active***.Protect
End If
End Sub
It seems to have problems accessing Microsoft Outlook which is causing the
debug as the form is to be emailed when the button is clicked.
Any ideas what else I need to do to fix this problem.
Thanks
Noemi
.
- Prev by Date: RE: Define variable from cell to open a file
- Next by Date: RE: Picture Problems
- Previous by thread: RE: Define variable from cell to open a file
- Next by thread: RE: Determine what row is currently selected
- Index(es):