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

Hi,

Just curious to know, is it possible to creat a excel file if it does
not exists in the given folder. Any code to do this???

Thanks in advance,
Kishore

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Creating a excel file

Try this kishore

Sub Test()
Dim mywkbk As Workbook
Dim myfile As String
Dim wb As Workbook
myfile = "C:\Data\test.xls"
If Dir(myfile) = "" Then
Set wb = Workbooks.Add
wb.SaveAs "C:\Data\test.xls"
wb.Close False
Else
MsgBox "Exist!"
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"kishore" wrote in message oups.com...
Hi,

Just curious to know, is it possible to creat a excel file if it does
not exists in the given folder. Any code to do this???

Thanks in advance,
Kishore



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 setup file for excel add-in Pawan Excel Discussion (Misc queries) 1 July 16th 08 10:16 AM
Creating a new file for each excel worksheet sherry Excel Discussion (Misc queries) 3 December 5th 07 08:18 PM
Need help with creating a text file via excel [email protected] Excel Worksheet Functions 3 June 13th 05 02:49 PM
Creating a PDF file programatically from Excel Chaplain Doug Excel Discussion (Misc queries) 0 December 16th 04 08:49 PM
Excel VBA -Creating a new file Wilbo Excel Programming 0 May 31st 04 07:41 AM


All times are GMT +1. The time now is 08:25 PM.

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

About Us

"It's about Microsoft Excel"