|
-
Oct 26th, 2004, 07:48 AM
#1
Thread Starter
Lively Member
write exel
does somebody know how to write data to diffrent cells in an exel file
i can write in cell a1 but not in other cells
can someone help me
-
Oct 26th, 2004, 10:14 AM
#2
PowerPoster
xlSheet.Cells(X, y).Value = new value
X = row
y = cell
xlBook.Close savechanges:=True
-
Oct 26th, 2004, 10:17 AM
#3
Thread Starter
Lively Member
i have googled a bit and i found this
Private Sub Form_Load()
Dim xl As Object
Dim wrk As Object
Dim sht As Object
Set xl = CreateObject("Excel.Application")
Set wrk = xl.Workbooks.Add()
Set sht = wrk.ActiveSheet
sht.Cells(1, 1) = "a"
sht.Cells(1, 2) = "b"
sht.Cells(1, 3) = "c"
sht.Cells(2, 1) = "'1"
sht.Cells(2, 2) = "'2"
sht.Cells(2, 3) = "'3"
wrk.SaveAs ("c:\test.xls")
xl.Quit
End Sub
can someons tell me if i can change a backgorund from a cell to
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|