ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compile Error: Expected End Property (https://www.excelbanter.com/excel-programming/336116-compile-error-expected-end-property.html)

George J[_3_]

Compile Error: Expected End Property
 
Has anyone any info on this error? I can't find anything.

My code worked when using XL97, but after our IT dept upgraded to XL2002 I
get this error. There is way too much code to post, but basically, the
workbook calls various workbooks to do calculations based on the data it
holds. This data is made into "value only" format and the vba code removed
so that it can be sent to clients.

For some reason the code breaks after removing the other workbooks code and
brings up one of the "sheet code" screens - even though there is no longer
any code there.

Can anyone see why this is happening or why it may have worked in 97 but not
2002?

many thanks
George

galimi[_2_]

Compile Error: Expected End Property
 
George,

Maybe there is a reference to a library that is no longer available.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

Has anyone any info on this error? I can't find anything.

My code worked when using XL97, but after our IT dept upgraded to XL2002 I
get this error. There is way too much code to post, but basically, the
workbook calls various workbooks to do calculations based on the data it
holds. This data is made into "value only" format and the vba code removed
so that it can be sent to clients.

For some reason the code breaks after removing the other workbooks code and
brings up one of the "sheet code" screens - even though there is no longer
any code there.

Can anyone see why this is happening or why it may have worked in 97 but not
2002?

many thanks
George


George J[_3_]

Compile Error: Expected End Property
 
I was looking through the library references in the "main" workbook and it
has "Microsoft Visual Basic for Applications Extensibility" ticked i though
that it should have 5.3 at the end of that.

In one of the other workbooks, the MS VBA Extensibility 5.3 is available,
but not ticked.

I thought i was activating the reference with
Code:

Sub MakeLibrary()
    On Error Resume Next                    'if it already exits
    ThisWorkbook.VBProject.References _
            .AddFromGuid "{0002E157-0000-0000-C000-000000000046}", 5, 0
    'This adds the VBA Extensibility library reference
'
'    Dim myGuid'
'
'On Error Resume Next
''myGuid = "Microsoft Visual Basic for Applications Extensibility 5.3"
'myGuid = "{0002E157-0000-0000-C000-000000000046}"
'Application.VBE.ActiveVBProject.References.AddFromGuid myGuid, 1, 0

End Sub

But the 5.3 part is not activating / changing description - could this be
the problem?

"galimi" wrote:

George,

Maybe there is a reference to a library that is no longer available.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

Has anyone any info on this error? I can't find anything.

My code worked when using XL97, but after our IT dept upgraded to XL2002 I
get this error. There is way too much code to post, but basically, the
workbook calls various workbooks to do calculations based on the data it
holds. This data is made into "value only" format and the vba code removed
so that it can be sent to clients.

For some reason the code breaks after removing the other workbooks code and
brings up one of the "sheet code" screens - even though there is no longer
any code there.

Can anyone see why this is happening or why it may have worked in 97 but not
2002?

many thanks
George


galimi[_2_]

Compile Error: Expected End Property
 
George,

Feel free to email me the spreadsheet @ , I'd be happy to
look @ it in my spare time.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

I was looking through the library references in the "main" workbook and it
has "Microsoft Visual Basic for Applications Extensibility" ticked i though
that it should have 5.3 at the end of that.

In one of the other workbooks, the MS VBA Extensibility 5.3 is available,
but not ticked.

I thought i was activating the reference with
Code:

Sub MakeLibrary()
    On Error Resume Next                    'if it already exits
    ThisWorkbook.VBProject.References _
            .AddFromGuid "{0002E157-0000-0000-C000-000000000046}", 5, 0
    'This adds the VBA Extensibility library reference
'
'    Dim myGuid'
'
'On Error Resume Next
''myGuid = "Microsoft Visual Basic for Applications Extensibility 5.3"
'myGuid = "{0002E157-0000-0000-C000-000000000046}"
'Application.VBE.ActiveVBProject.References.AddFromGuid myGuid, 1, 0

End Sub


But the 5.3 part is not activating / changing description - could this be
the problem?

"galimi" wrote:

George,

Maybe there is a reference to a library that is no longer available.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

Has anyone any info on this error? I can't find anything.

My code worked when using XL97, but after our IT dept upgraded to XL2002 I
get this error. There is way too much code to post, but basically, the
workbook calls various workbooks to do calculations based on the data it
holds. This data is made into "value only" format and the vba code removed
so that it can be sent to clients.

For some reason the code breaks after removing the other workbooks code and
brings up one of the "sheet code" screens - even though there is no longer
any code there.

Can anyone see why this is happening or why it may have worked in 97 but not
2002?

many thanks
George


George J[_3_]

Compile Error: Expected End Property
 
Thanks for the offer galimi - seem to have it sorted.

I took out all reference to the "remove code" macro and put it in a "before
save" event which seems to have done the trick. Seems excel does not like
you running code after you have removed code - even if it was in another
workbook. (at least in XL2002)

thanks again
George

"galimi" wrote:

George,

Feel free to email me the spreadsheet @ , I'd be happy to
look @ it in my spare time.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

I was looking through the library references in the "main" workbook and it
has "Microsoft Visual Basic for Applications Extensibility" ticked i though
that it should have 5.3 at the end of that.

In one of the other workbooks, the MS VBA Extensibility 5.3 is available,
but not ticked.

I thought i was activating the reference with
Code:

Sub MakeLibrary()
    On Error Resume Next                    'if it already exits
    ThisWorkbook.VBProject.References _
            .AddFromGuid "{0002E157-0000-0000-C000-000000000046}", 5, 0
    'This adds the VBA Extensibility library reference
'
'    Dim myGuid'
'
'On Error Resume Next
''myGuid = "Microsoft Visual Basic for Applications Extensibility 5.3"
'myGuid = "{0002E157-0000-0000-C000-000000000046}"
'Application.VBE.ActiveVBProject.References.AddFromGuid myGuid, 1, 0

End Sub


But the 5.3 part is not activating / changing description - could this be
the problem?

"galimi" wrote:

George,

Maybe there is a reference to a library that is no longer available.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"George J" wrote:

Has anyone any info on this error? I can't find anything.

My code worked when using XL97, but after our IT dept upgraded to XL2002 I
get this error. There is way too much code to post, but basically, the
workbook calls various workbooks to do calculations based on the data it
holds. This data is made into "value only" format and the vba code removed
so that it can be sent to clients.

For some reason the code breaks after removing the other workbooks code and
brings up one of the "sheet code" screens - even though there is no longer
any code there.

Can anyone see why this is happening or why it may have worked in 97 but not
2002?

many thanks
George



All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com