BlackBox Posted December 3, 2010 Share Posted December 3, 2010 You've heard the scenario before... Major migration to new servers, directory structure changes, and the original author is no longer working here. But the tool is valued, so i am attempting to revise it accordingly, and need some help. I have gone through each module of the VBA project, and commented out each of the original hard-coded paths, and added a line for the correct path post-migration. However, I still get this error which launches VBAIDE (Land Desktop 2009), and highlights the line of code shown automatically: We have upgraded our MS Office from 2003 to 2007 with this migration, but I cannot seem to find the call for any Excel library, etc. I am adept at Visual LISP (ActiveX COM), but am a VBA novice; any help would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 3, 2010 Share Posted December 3, 2010 You may have to change a reference to the newer version of Excel. VBAIDE-Tools-References... Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 3, 2010 Author Share Posted December 3, 2010 (edited) You may have to change a reference to the newer version of Excel. VBAIDE-Tools-References... Thanks for the prompt response. Upon viewing the associated references, it appears (to me) that Office 12 (v2007?) is already being referenced, no? Edited December 3, 2010 by BlackBox Typo Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 3, 2010 Author Share Posted December 3, 2010 After additional poking around, should the 'Microsoft Excel 12.0 Object Library' be targeting 'XL5EN32.OLB' in lieu of 'EXCEL.EXE'...? Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 3, 2010 Share Posted December 3, 2010 After additional poking around, should the 'Microsoft Excel 12.0 Object Library' be targeting 'XL5EN32.OLB' in lieu of 'EXCEL.EXE'...? That is quite possible. Here is how it looks here with Excel 2003. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 3, 2010 Author Share Posted December 3, 2010 Interestingly, my 'Microsoft Excel 5.0 Object Library' points to ..\OFFICE12\XL5EN32.OLB file. When I attempt toredirect ...Excel 12.0... to the correct file, it gives an error: The 5.0 Object Library is not selected, and the 2003 software is not installed. Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 3, 2010 Share Posted December 3, 2010 It sound like you're doing the right things. I don't know for certain, though, because I've never had to wrangle with that Migration/Upgrade. Probably fortunate for me. For the sake of curiosity, was there an uninstall of 2003 prior to the upgrade to Office 2007? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 4, 2010 Author Share Posted December 4, 2010 It's a bitter sweet to confirm that I doing the right things, as the functions still will not work. For the sake of curiosity, was there an uninstall of 2003 prior to the upgrade to Office 2007? No. IT physically replaced the HDD in each computer (for admin, managers, etc.), and the CAD users got all new computers. For example, I went from a Dell Precision 390 (PC), to a Dell Precision M4500 (Laptop) as part of my new role/responsibilities. Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 4, 2010 Share Posted December 4, 2010 I know at one time there was an issue with installing Office after an AutoCAD install. The Office setup procedure mucked up settings AutoCAD relied on for the VBAIDE. That particular issue could be fixed by reinstalling AutoCAD. From what I recall, though, that sequence issue was resolved after a few AutoCAD releases. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) I really appreciate your time and effort to try and assist me, Seant. It looks like I am at a stand-still until I have time to learn up on VBA, to better diagnose the issue I am experiencing. Edit: Which is fine, as I see the code being ported to VB.NET, and .NET is something I'd like to learn next. Edited December 4, 2010 by BlackBox Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 7, 2010 Author Share Posted December 7, 2010 You'll never guess how simple this was to solve.... I'm embarrassed , to say it. Within the reference list, I deselected 'Microsoft Office 12.0 object library' then hit 'OK'. Saved the project, then opened the references again. I scrolled down, and selected (not checked) 'Microsoft Office 12.0 object library' then hit 'Browse' and navigated to the ..\OFFICE12\XL5EN32.OLB file and hit 'OK'. Save the project... and walla! Originally, there were two references to ... Office 5.0, and ... Office 12.0 that conflicted. Once the 12.0 was removed from the reference list, apparently that freed up to conflict. Hooray! Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 8, 2010 Share Posted December 8, 2010 Good to hear that you’re back up and running. This VBA solution may have been relatively easy but that shouldn’t cause embarrassment. Determining the level of mojo required is a handful in itself. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.