10-12-2011, 02:02 PM
[i]
Here iam trying to save file name as sanity.xls
Where i am taking file name from variable x
But iam getting error
How to save the file name like this
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:\[color=#FF0000]"x".[/color]xls"
xlApp.quit
Here iam trying to save file name as sanity.xls
Where i am taking file name from variable x
But iam getting error
How to save the file name like this