Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Str function does not work
I just purchased a new computer with Office Professional 2003. When I
transferred my data I receive an error Can't find project or library. It stops at the str function I am using. The help file mentions something about a reference being broken. However, the reference option on the tool bar is greyed out. What should I do? Thank you in advance. -- M. Shipp |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Str function does not work
Did you stop the running code before you looked under Tools to click on
References? SHIPP wrote: I just purchased a new computer with Office Professional 2003. When I transferred my data I receive an error Can't find project or library. It stops at the str function I am using. The help file mentions something about a reference being broken. However, the reference option on the tool bar is greyed out. What should I do? Thank you in advance. -- M. Shipp -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Str function does not work
Thank you. That worked.
-- M. Shipp "Dave Peterson" wrote: Did you stop the running code before you looked under Tools to click on References? SHIPP wrote: I just purchased a new computer with Office Professional 2003. When I transferred my data I receive an error Can't find project or library. It stops at the str function I am using. The help file mentions something about a reference being broken. However, the reference option on the tool bar is greyed out. What should I do? Thank you in advance. -- M. Shipp -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Str function does not work
The references dialog may be grayed out because the VBProject is protected.
If this the case, unprotect the project and fix the reference that is marked MISSING. If this is not the case, carry on as follows: Start out by running Excel with the /regserver switch. With Excel closed, go to the Windows Start menu, choose the Run dialog, and enter the following and click OK: Excel.exe /unregserver You may need to supply the whole path to Excel: "C:\Program Files\Microsoft Office\Office11\Excel.exe" /unregserver Of course, your actual path may be different. Now, repeat the process but change /unregserver to /regserver. This causes Excel to rewrite some of its registry keys back to "factory defaults". Now start Excel normally. If it works, you're in good shape. If it doesn't work, try starting Excel in Safe Mode. Again from the Run dialog, enter Excel.exe /safe If Excel starts in Safe Mode, try to go into the VBA Editor and look at the references. If the references are still grayed out, try running the following code (assuming you can get code to run). Sub Diagnostic() Dim Ref As Object Dim N As Long For Each Ref In ThisWorkbook.VBProject.References N = N + 1 With Ref Cells(N, 1) = .Name Cells(N, 2) = .Description Cells(N, 3) = .FullPath Cells(N, 4) = .GUID Cells(N, 5) = .IsBroken End With Next Ref Range("A1:E1").EntireColumn.AutoFit End Sub Save this workbook. In Excel, look in Column E for a value of TRUE, indicating that reference is broken. In that case, try the following form the Immediate Window in VBA: ThisWorkbook.VBProject.References.Remove ThisWorkbook.VBProject.References(N) where N is row number on the worksheet containing the broken reference. Now close and restart Excel normally and see if you can work in VBA. Depending what reference was broken, and why it was broken, you may be able to re-establish, if you think it is a necessary reference, the reference using its GUID. Open the workbook that listed the references, and in code or in the Immediate Window, execute: ThisWorkbook.VBProject.References.AddFromGuid "{GUID}",0,0 where "{GUID}" is the long string of letter and numbers in column 4 of the workbook. If none of this works, try running Detect And Repair from the Help menu. You will probably need the Office CD to use Detect And Repair. If that doesn't work and you feel confident enough to modify the system registry (DEFINITELY not for the novice, one mistake and you can REALLY screw things up -- there is no UNDO feature), run RegEdit and rename the following keys: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\ Excel to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\ ExcelOLD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Excel to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Excel OLD HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel to HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcelOLD HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel to HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcelOLD Now start Excel normally. You will have lost all your customization options, but Excel will recreate the registry with its default values. This is a much more complete registry fix that is accomplished with the /regserver switch described above. I recently had a problem with Excel 2003 that was cured only by renaming the registry keys. All other efforts failed to solve the problem. If none of this works, you may have to do a total and complete uninstall and reinstall. -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "SHIPP" wrote in message ... I just purchased a new computer with Office Professional 2003. When I transferred my data I receive an error Can't find project or library. It stops at the str function I am using. The help file mentions something about a reference being broken. However, the reference option on the tool bar is greyed out. What should I do? Thank you in advance. -- M. Shipp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need a function that will work using multiple work books and sheet | Excel Worksheet Functions | |||
Why does my Function not work? | Excel Discussion (Misc queries) | |||
How come the function '=SUM(A2:A6)*24' doesn't work | Excel Programming | |||
VBA Function won't work! | Excel Programming | |||
how do i get the mid function to work with a zero | Excel Worksheet Functions |