Click to See Complete Forum and Search --> : Saving Excel workbook with VB6
ChrisCote
Aug 2nd, 1999, 04:46 PM
OK now, I'm almost there. I still can't seem to figure out why one of the Excels won't go away, but I think I'm on the right track now. Now the slight problem I'm having is that once I have saved a file, if I try to edit and resave it, a message box appears from Excel telling me there's already a file with that name and would I like to rename it. How do I make my program not show this message and just save the darn thing? I already know it's the same name.
Lloyd
Aug 2nd, 1999, 05:28 PM
Hi!!
All you need is one line of code:
xlExcel.Application.DisplayAlerts = False
xlExcel is your object and the rest of the line goes in just as you see it.
Hope this helps!!
Lloyd
ChrisCote
Aug 2nd, 1999, 05:35 PM
Does this go right in the beginning of the procedure or just before I do the save? Or does it really matter?
ChrisCote
Aug 2nd, 1999, 05:58 PM
I did this at the beginning and the opposite at the end of my procedure. Now when I go to close the activeworkbook I am getting an "Object variable or with block not set" error. Here is the line it's catching on:
MyExcel.ActiveWorkbook.Close True, sExcelFileName
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.