Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a function that will work using multiple work books and sheet capt c Excel Worksheet Functions 1 March 30th 09 10:20 PM
Why does my Function not work? [email protected] Excel Discussion (Misc queries) 2 April 27th 07 10:22 PM
How come the function '=SUM(A2:A6)*24' doesn't work Glyndotcom Excel Programming 8 October 4th 06 10:21 AM
VBA Function won't work! [email protected] Excel Programming 6 June 29th 06 09:10 AM
how do i get the mid function to work with a zero garbold Excel Worksheet Functions 7 June 7th 06 10:58 PM


All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"