Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default creating new file

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default creating new file

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating csv file Julie Excel Discussion (Misc queries) 3 March 23rd 09 08:51 PM
creating a master file Shak Excel Worksheet Functions 1 December 8th 08 07:11 PM
Creating % formula help for log file. Zilla Excel Discussion (Misc queries) 1 February 1st 07 04:57 AM
Creating a CSV File from.... Nimish Excel Discussion (Misc queries) 0 October 4th 06 10:30 PM
creating an exe file with visual basic (installation file for Macros and Userforms) [email protected] Excel Programming 3 August 5th 04 10:16 AM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"