how do I save after this 
Author Message
 how do I save after this

I have the following code which formats a column of data and I'm wanting to
save it....without getting prompted for the save but I have been unable to
get it to work

dim xlapp as excel.application
set xlapp = new excel.application
xlapp.workboosk.open (app.path & "\supprt.xls")
xlapp.worksheets("sheet1").activate
xlapp.columns("A:A").select

xlapp.workbooks.close
set xlapp = nothing

Any ideas?



Sat, 04 Aug 2001 03:00:00 GMT  
 how do I save after this
Use the DisplayAlerts property to suppress prompts:

Dim xlapp As Excel.application
Set xlapp = New Excel.application
xlapp.Workbooks.open ("c:\temp.xls")
xlapp.Worksheets("sheet1").Activate
xlapp.Columns("A:A").Select

xlapp.DisplayAlerts = False
xlapp.Workbooks(1).Save
xlapp.Workbooks(1).Close
Set xlapp = Nothing

You may want to turn DisplayAlerts back on after the save.

HTH.
--
Nustium
(To reply via email remove the obvious from address.)

Quote:

>I have the following code which formats a column of data and I'm wanting to
>save it....without getting prompted for the save but I have been unable to
>get it to work

>dim xlapp as excel.application
>set xlapp = new excel.application
>xlapp.workboosk.open (app.path & "\supprt.xls")
>xlapp.worksheets("sheet1").activate
>xlapp.columns("A:A").select

>xlapp.workbooks.close
>set xlapp = nothing

>Any ideas?



Sun, 05 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Save as: Web page Archive, can it be done programmatically

2. ADO thinks DBMS is done, but DBMS ain't done

3. Excel and Word automation - disable Save/Save as

4. Excel Save vs Save As

5. Save changes back to a previously saved .msg file

6. Overwriting Word's built-in Save with my own Save

7. Overloading the Save / Save As functions in Word.

8. Disabling Save/Save-As feature

9. Save or Save As?

10. Overloading the Save / Save As functions in Word.

11. Disabling Save/Save As function

12. Saving without saving macros

 

 
Powered by phpBB® Forum Software