Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
microsoft visual basic-compile error in hidden module:modMain | Excel Discussion (Misc queries) | |||
Visual Basic Compile Error | Excel Discussion (Misc queries) | |||
Microsoft Visual Basic: Compile error: Sum or Function not defined | Excel Worksheet Functions | |||
Microsoft Visual Basic: Compile error: Sum or Function not defined | Excel Programming | |||
microsoft visual basic compile error can't find library | Setting up and Configuration of Excel |