10-12-2011, 10:13 PM
Hi,
Here we go...
Here we go...
Code:
Dim xlApp
Dim xlBook
Dim xlSheet
Dim x
x= "sanity"
Set xlApp=CreateObject("Excel.Application")
Set xlBook=xlApp.workbooks.add
Set xlSheet=xlBook.Activesheet
xlSheet.cells(1,1)="Oppurtunity Id"
xlSheet.cells(1,2)= "MSG16"
xlBook.saveas "C:\"&x&".xls"
xlApp.quit
Set xlApp=Nothing