Has my macro broken Excel?

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

All

I've started writing VBA macros. I have however, upset Excel. When I
click on an Excel spreadsheet file in a folder, Excel opens as an
application, but the associated file does not open. If I go into Excel
and open the file from there, all is OK.

The only bit of VBA I can see which may have done this is:

Windows("myfile.xls").Activate
Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

This may or may not be the reason. I'd appreciate any comments or
suggestions.

Regards

Alan
 
Hi
in Excel goto 'Tools - Options - General' and uncheck 'Ignore other
applications'
 
go to tools=>Options and then the general tab. If Ignore Other
Applications is checked, then uncheck it.

If that doesn't fix the problem (or is not the problem)

close excel.

Go to the Windows Start menu and select Run

in the textbox enter

Excel.exe /regserver

Click the OK button
 
This may sound daft but have you tried right clicking an Excel fil
choose open with (if this doesnt appear click off the file then laf
click once hold down the shift key and then right click once open wit
should now be available) click on the excel icon once and then clic
the check box "Always the selected program to open this file type".

A shot in the dark but that may be your problem!

HTH

Simo
 
Thanks to all of you who responded. The unchecking of "ignore all
other apps" fixed the problem. I would like to understand why, and
what I did to break it in the first place if anyone can explain.
Again, many thanks.

Alan
 
First, I don't think it was your macro that broke it.

Second, I don't know if anyone can guess how that checkbox got toggled for you.

Third, this wasn't very much help, huh!

But this problem seems to happen to lots of people (mysteriously!!!)--so you're
not alone (yeah, that doesn't help, either.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top