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 |
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 |
All times are GMT +1. The time now is 10:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com