Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
close excel with no selection
Hello, im using excel as a COM object in axapta to import data, when im done
I want to move the excel file into a folder called "IMPORTED" but when I use: application.DisplayAlerts(false); //dont prompt saving message application.quit(); //quit app I get a "Microsoft Visual Basic" run-time error '1004' I need a way to close the file w/o any prompts cause I cant move the file as its not closed by untill I press "END" on the debug box PS: The VB error is caused by a for /next that deletes special menues created to print the excel file. The file itselfe comes from a different company so im not much interested in fixing the vb error as its most likley only a error outside their excelsetup (oooor something :P) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
close excel with no selection
I'm no VB expert at all, but I had a similar problem with unwanted prompts. I
used these lines to solve it. Maybe you can use it. Application.DisplayAlerts = False Windows("YourFileNameHere").Close Application.DisplayAlerts = True Don |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
close excel with no selection
Hi, thanks for answering, im allready using Application.DisplayAlerts = False
application.DisplayAlerts(false); this is the method im using on my side of a COM object this gets rid of the "do you wanna save" box. But what I want is to get rid of a messagebox that comes due to a VB run-time error created inside excel as its closed. This messagebox stops windows from closing the file and that meens that someone is still accessing the file and then I cant move the file to another loaction. as Application.DisplayAlerts = False only seems to remove normal allerts such as remember to save I was wondering if there would be something to ignore or auto close a runtime error message. hope I make any scense :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
why do all excel worksheets/workbooks close when I close one? | Excel Discussion (Misc queries) | |||
Not close thead when I close excel | Excel Programming | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel | |||
combo box close on selection help!! | Excel Programming |