hi ,
i am using a msexcell file........i am storing values into it.......now i have to save and close it........how can i do it?
thanks and regards
vivek.s
Printable View
hi ,
i am using a msexcell file........i am storing values into it.......now i have to save and close it........how can i do it?
thanks and regards
vivek.s
have you searched the forum? doesn't it save if you just close it?
i jus went thru google....did not search forum.......its bit tedious goin thru post by post.........
regards
vivek.s
I think that the .Save command does it. You could record a macro, and then look at it. Here is some code that I found.
Code:Private Sub Command2_Click() 'Save
CommonDialog1.Filter = "Excel Files(*.xls)|*.xls|All Files(*.*)|*.*"
CommonDialog1.ShowSave
temp = CommonDialog1.FileName
xls.DisplayAlerts = False 'So Excel will Not ask about overwriting...it will just Do it
xls.ActiveWorkbook.SaveAs temp
'or If you want To just save it In the exsistin Workbook use
'xls.ActiveWorkbook.Save
'without the save dialog
End Sub
thanks!
Set oApp = New Excel.Application
oApp.Workbooks.Save
oApp.quit
this works fine
regards
vivek.s
The forum search can be pretty specific I find.