aziz rasul
Active member
- Local time
- Today, 02:09
- Joined
- Jun 26, 2000
- Messages
- 1,935
I have the following code.
Private Sub Command0_Click()
Dim dbs As Database
Dim obxls As Object
Set dbs = CurrentDb
Set obxls = CreateObject("Excel.Application")
obxls.Visible = True
obxls.Workbooks.Open Filename:="D:\NTL\Phase II Data Comparison\Output Files\Data Comparisons", ReadOnly:=False
obxls.Sheets(1).Name = "NTL Data Comparisons"
Code to change individual cell values
obxls.Quit
Set obxls = Nothing
End Sub
The task is to change some of the values of the xls file and then save it automatically. However I am prompted to save and I have to od it manually. What code can I add at the end to do this. Also if I wanted to save the xls file to a different filename.
Private Sub Command0_Click()
Dim dbs As Database
Dim obxls As Object
Set dbs = CurrentDb
Set obxls = CreateObject("Excel.Application")
obxls.Visible = True
obxls.Workbooks.Open Filename:="D:\NTL\Phase II Data Comparison\Output Files\Data Comparisons", ReadOnly:=False
obxls.Sheets(1).Name = "NTL Data Comparisons"
Code to change individual cell values
obxls.Quit
Set obxls = Nothing
End Sub
The task is to change some of the values of the xls file and then save it automatically. However I am prompted to save and I have to od it manually. What code can I add at the end to do this. Also if I wanted to save the xls file to a different filename.