LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Microsoft Visual Basic- compile error: can't find project or libra

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 ActiveSheet.ProtectContents = True Then
P = True
ActiveSheet.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
ActiveSheet.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
ActiveSheet.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
 
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
microsoft visual basic-compile error in hidden module:modMain Roman Piotr Excel Discussion (Misc queries) 3 January 23rd 13 01:49 PM
Visual Basic Compile Error k3639 Excel Discussion (Misc queries) 5 September 13th 06 10:02 PM
Microsoft Visual Basic: Compile error: Sum or Function not defined Dmitry Excel Worksheet Functions 12 April 3rd 06 07:28 AM
Microsoft Visual Basic: Compile error: Sum or Function not defined Dmitry Excel Programming 13 April 3rd 06 07:26 AM
microsoft visual basic compile error can't find library mamabuff Setting up and Configuration of Excel 1 December 29th 05 11:19 AM


All times are GMT +1. The time now is 04:07 PM.

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"