Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

closing of files (Excel) on Windows NT4.0

Status
Not open for further replies.

belgiumbob

Technical User
Nov 26, 2001
5
BE
I read the thread about closing a file from a macro. However, this doesn't work in the following combination: Excel 97 for windows NT, windows NT 4.0. This only works if there is only one file open (including the hidden workbooks!). Can anyone help me? Or is this a bug? (I hope not).
The purpose is to open five files, get the data out of these files, and then close these files.

Thanks, Bob
 
heres a cheesy way to do it....

dim datafiles as integer

datafiles = 0

Do Until datafiles = 5

window(1).close savechanges:=false

datafiles = datafiles +1

loop

 
Thanks, I will certainly try it.
But there is something else that's the cause of my problems. We have an e-mail application, called TeamWare. To send a file directly from excel, a file (twisend.xla) is installed in the directory of excel, so that an extra menu appears in Excel. However, with this file (an add-on?) installed, my macro doesn't work. When I remove this xla my problem is solved.
So, without the Add-On, I can send my mail by programming and I can close my workbooks (with programming in VBA) but I can't send files directly from Excel by means of the menu, if I install the Add-On, I can send a file directly by using the menu but the commande workbooks(name).close doesn't work.

This is for the TeamWare-group, should any of them read this: Nice one!

However, thanks for your tip.

BelgiumBob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top