Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compile Error: Wrong arguments or Invalid property | Excel Discussion (Misc queries) | |||
Micrsoft Visual Basic Compile error: Expected: end of statement | Excel Discussion (Misc queries) | |||
compile error: expected variable or function | Excel Discussion (Misc queries) | |||
Runtime error 380: Could not set the List property. invalid property value of listbox | Excel Programming | |||
expected sub, function, or property | Excel Programming |