Financial Daily from THE HINDU group of publications
Monday, Aug 02, 2004

Port Info

Group Sites

eWorld - Computer Usage
Columns - Tip Off

Trouble with macros

I have an Excel macro that was being used in Microsoft NT environment. But after I switched over to XP, the macro no longer functions properly. Instead, the following error message always appears: "A document with the name `filename{gt}' is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that is currently open, or rename one of the documents." When I close the current file, excel ends. What could be the problem? Please suggest a solution.


There is every chance that the macro will not run, as there is quite a lot of difference in architecture between Windows NT and Windows 2000, and more changes have been made to the object model of new Office versions. One major difference to note in your context is that older versions of Office used MDI (Multiple Document Interface) where the application is the parent window and the files opened within the parent window with only a single instance of the application. Office XP uses true Single Document Interface (SDI) technology, where each file opened starts an application of its own (opens in separate windows). So, if you open five files, you will have five instances of that SDI running at the same time. This being the case, opening or creating multiple files in recursive mode might be a problem. So, basically you will have to reconstruct your code. If you could please send us your code piece and the version of Office you are using, we could be of more help.

Solution by G. Rajah

Please e-mail us at

if you have queries on computer usage or if you find an interesting way of using a computer.

Article E-Mail :: Comment :: Syndication :: Printer Friendly Page

Stories in this Section
Slowing down

Computing power on demand
Some pencil truths
At the stroke of a mouse
Here's the key
Trouble with macros
More on file extensions
Trouble playing games
The real McCoy
Faking 'made easy'
Ouch! That hurts
From all sides...
Lights, camera, CG!
A new line

The Hindu Group: Home | About Us | Copyright | Archives | Contacts | Subscription
Group Sites: The Hindu | Business Line | The Sportstar | Frontline | The Hindu eBooks | Home |

Copyright 2004, The Hindu Business Line. Republication or redissemination of the contents of this screen are expressly prohibited without the written consent of The Hindu Business Line