Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am trying to create a new excel file using VB. ================================================== ===== workbooks.add ActiveWorkbook.SaveAs FileName:="C:\temp\newfile.xls", FileFormat:= xlNormal, password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False ================================================== ==== This code works fine, i can create the excel file, but once i executed this code, the file is took control by the Excel.exe application. even though my program has finished running and is close completely. I still can't open the newly created file. It can only be opened as read-only. The only thing i can do is go to windows task manager and find the Excel.exe process and kill the process. then i can have control of the file. I am running WinXP SP1 and Office 2003 SP1. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Roy,
Assuming that you opening Excel in VB.Net with something like: xlApp = CreateObject("Excel.Application") you'd use something like this to close it: xlApp.Quit() hth, Doug Glancy "Roy T" wrote in message ... Hi all, I am trying to create a new excel file using VB. ================================================== ===== workbooks.add ActiveWorkbook.SaveAs FileName:="C:\temp\newfile.xls", FileFormat:= xlNormal, password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False ================================================== ==== This code works fine, i can create the excel file, but once i executed this code, the file is took control by the Excel.exe application. even though my program has finished running and is close completely. I still can't open the newly created file. It can only be opened as read-only. The only thing i can do is go to windows task manager and find the Excel.exe process and kill the process. then i can have control of the file. I am running WinXP SP1 and Office 2003 SP1. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating csv file | Excel Discussion (Misc queries) | |||
creating a master file | Excel Worksheet Functions | |||
Creating % formula help for log file. | Excel Discussion (Misc queries) | |||
Creating a CSV File from.... | Excel Discussion (Misc queries) | |||
creating an exe file with visual basic (installation file for Macros and Userforms) | Excel Programming |