Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Hello everyone,
A single line of my vba code that I use to use all the time in excel 2000 no longer works in excel 2007. When I try to use the command: Left(myString, Len(myString) - 1) is get the following error: "Compile Error: Can't find project or library" I made sure to use the "Run all items from my computer" when installing excel 2007, so all libraries should be present. Any ideas? Thanks in advanced *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Hi Blaine
If you look in ToolsReferences in the VBA editor Do you see a Missing item in the list -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Blaine" wrote in message ... Hello everyone, A single line of my vba code that I use to use all the time in excel 2000 no longer works in excel 2007. When I try to use the command: Left(myString, Len(myString) - 1) is get the following error: "Compile Error: Can't find project or library" I made sure to use the "Run all items from my computer" when installing excel 2007, so all libraries should be present. Any ideas? Thanks in advanced *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Thanks for the reply Ron. For some reason, when I click "Tools", I can
see "References" but it is grayed out so that I can't select it. Do you know what I might be doing wrong? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Ron, Ok, I have the following check marked under Tools-References: "Visual Basic for Applications" "Microsoft Excel 12.0 Object Library" "OLE Automation" and "Microsoft Office 12.0 Object Library" *** Sent via Developersdex http://www.developersdex.com *** |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
If you not see one with "missing" in it it is OK
Do you have the same problem if you try it in another workbook Sub aaa() Dim myString As String myString = "12345" MsgBox Left(myString, Len(myString) - 1) End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Blaine" wrote in message ... Ron, Ok, I have the following check marked under Tools-References: "Visual Basic for Applications" "Microsoft Excel 12.0 Object Library" "OLE Automation" and "Microsoft Office 12.0 Object Library" *** Sent via Developersdex http://www.developersdex.com *** |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Ron,
That's a good point. I tried it and it works in another workbook. I probably should have mentioned this earlier, but the "Left(myString, Len(myString) - 1)" is buried in an xla file (addin). Any ideas on why it would work as a direct macro but not in the addin? *** Sent via Developersdex http://www.developersdex.com *** |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Have checked the references of the add-in ?
Select the add-in project first on the left in the editor -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Blaine" wrote in message ... Ron, That's a good point. I tried it and it works in another workbook. I probably should have mentioned this earlier, but the "Left(myString, Len(myString) - 1)" is buried in an xla file (addin). Any ideas on why it would work as a direct macro but not in the addin? *** Sent via Developersdex http://www.developersdex.com *** |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Thanks for your help Ron,
I'm not sure why, but for some reason it started working! Talk to you later, Blaine *** Sent via Developersdex http://www.developersdex.com *** |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for excel 2000 no longer works in excel 2007
Hi Blaine,
Two recommendations when this happen: 1 - Clean or decompile the VBA project normally is sufficient. There're two utility that facilitate this: http://www.appspro.com/Utilities/CodeCleaner.htm http://orlando.mvps.org/VBADecompile...IdC=Orlmorewin 2 - Explicit VBA parent objects like this: VBA.Strings.Left(myString, VBA.Strings.Len(myString) - 1) On Oct 3, 1:49*pm, Blaine wrote: Hello everyone, A single line of my vba code that I use to use all the time inexcel 2000 no longer works inexcel2007. *When I try to use the command: Left(myString, Len(myString) - 1) is get the following error: "Compile Error: Can't find project or library" I made sure to use the "Run all items from my computer" when installingexcel2007, so all libraries should be present. Any ideas? Thanks in advanced *** Sent via Developersdexhttp://www.developersdex.com*** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 / application.filesearch no longer works | Excel Programming | |||
Code No Longer Works in 2007 | Excel Programming | |||
Excel 2000 - Microsoft Investor Stock Quotes.iqy no longer works? | Excel Programming | |||
folderexists code no longer works after moving to excel 2003 | Excel Programming | |||
VB6 Excel 97 code no longer works if Win2K SP3/4 applied. | Excel Programming |