Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating setup file for excel add-in | Excel Discussion (Misc queries) | |||
Creating a new file for each excel worksheet | Excel Discussion (Misc queries) | |||
Need help with creating a text file via excel | Excel Worksheet Functions | |||
Creating a PDF file programatically from Excel | Excel Discussion (Misc queries) | |||
Excel VBA -Creating a new file | Excel Programming |