# Can't open excel files by double clicking, HAS to load withen excel



## Psych (Nov 10, 2004)

Ok this is a weird problem I ran into in the past with Word, and I'm having trouble finding information on it, because of the details involved.

What's happening is if i load up Excel and then goto file/open and load an excel document it comes up.

If I goto Start/Documents and try to load it from there Excel seems to hang, also if i Browse my computer and goto any excel file same thing happens, and of course it happens over a network share as well.

I didn't give it more then a minute or 2 to come up (We are talking small Excel files here nothing huge) On the last computer this happened on with Word, the documents would eventually come up, but it would take 5 minutes to load this way.

Anything I load withen Excel (Meaning I load excel and then goto File/Open, comes up instantly)

Windows knows how to handle the excel files and what program to load them with, I tried deleteing the (Is it called a mime?) entry in windows that tells excel how to handle the .XLS file, then held shift and Right clicked a .XLS file to re-enter it into Windows, just in case Windows wasn't opening it right but this had the same effect.
Any ideas?
Thanks


----------



## XL Guru (Aug 30, 2003)

You don't say what the outcome with Word was (?)

I'll look up some things to try:

#1 ; Tools -- Options -- General. *Un*check "Ignore Other Apps".

#2 ; Re-register.

With Excel closed, Start -- Run. Type "excel.exe /unregserver" (without the quotes, *with* the space), click OK.

Start -- Run again. Type "excel.exe /regserver" (without the quotes, *with* the space), click OK.


----------



## Psych (Nov 10, 2004)

The outcome with Word never got resolved, I was working for a different company at the time and switched over before I had a chance to really research it.
I'll try what you posted next week sometime, thank you.
If anyone else has ideas please post them as the site I'm going to, to test the things I find here is almost an hour from where I work, so I'd like to go there with as much ammo as possible to solve my issue.
Thanks
Chris


----------



## XL Guru (Aug 30, 2003)

You're welcome. And since you're new here, you're welcome.  

Rgds,
Andy


----------



## Zack Barresse (Jul 25, 2004)

Hello there,

I definitely agree with Andy on this one, a reregister is a VERY good idea. Although I'm also thinking that maybe your XLB file(s) may be bloated, as this is happening on an instance startup and not when you are already in Excel. XLB files are Excel's toolbar files where it stores the information used in an Application instance. It acts much like Word's Normal.dot (normal dot dot), whereas if deleted, upon startup it will create a new one. They should typically be in the 10-20 kb range, anything larger is generally considered to be bloated.

Do this..

Please note: This is NOT VBA! IT IS VB (Visual Basic) CODE! DO NOT RUN FROM EXCEL! We do this because they will not be deleted if Excel is open, and thus using them.

So ensure Excel is completely closed out.
Open Notepad.
Copy the following code to it:

```
Dim usrname 
Dim path2000XP 
Dim path98NTME 
Dim path98NoProfile 
Dim fso 
Dim objWSH 
Dim answer 
 
answer = msgbox ("This script deletes Excel's toolbar file." & vbcrlf & _ 
"Please ensure that Excel is closed, so that the code will run properly." & vbcrlf & _ 
"Press OK to continue, Cancel to stop", vbokcancel) 
 
If answer <> vbOK Then wscript.quit(1) 
 'Find login-name
Set objWSH = CreateObject("WScript.Network") 
usrname=objWSH.UserName 
 
 'Path to excel.xlb. First and second or win98 & NT, third for win2000 & XP
path98NoProfile = "C:\Windows\Application Data\Microsoft\Excel\excel*.xlb" 
path98NTME   	= "C:\Windows\Profiles\" & usrname & "\Application Data\Microsoft\Excel\excel*.xlb" 
path2000XP	= "C:\Documents and Settings\" & usrname & "\Application Data\Microsoft\Excel\excel*.xlb" 
 
Set fso = CreateObject("scripting.filesystemobject") 
 
 'Delete excel.xlb. If not exists goto next
On Error Resume Next 
fso.deletefile path98NoProfile 
fso.deletefile path98NTME 
fso.deletefile path2000XP 
 
 'Clean up
Set fso = Nothing 
Set objWSH = Nothing 
 
 'Show Finished and exit
msgbox "xlb-file is deleted"
 '(Thanks to Tommy Bak)
```
Save the file as "RemoveXLB.vbs", preferrably to your desktop.
To be safe, make copies of your .XLB files before running this script.
Now doubleclick the file Note: This script will have no effect if VB scripting has been disabled on your computer. Also, virus scanners may warn you of a potentially dangerous script; you can choose to let it continue to run until finished.

HTH


----------



## Psych (Nov 10, 2004)

I don't know how to code VB but from what it looks like all this does is find each user for win9x and win2k/xp and delete 1 file from their users directory for excel toolbars... I could manually go into each directory for each user (only 1 in this case) and rename or delete the file myself, yes =)?
Thanks
Chris

Edit: providing the first solution doesn't work that is.


----------



## Zack Barresse (Jul 25, 2004)

Correct. Just ensure Excel is completely closed.


----------



## Psych (Nov 10, 2004)

The first fix from XLGuru worked perfectly, sorry for the long reply but I had so many other things going on I never got a chance to get down to the location to try it, thanks very much everyone =)
Psych


----------

