newbie question 
Author Message
 newbie question

I am writing a script that writes result variables to a speadsheet. My
problem is I don't know what to write in the script to have it write to the
next row down when the script is ran again. Below is what I have so far.

Dim xlApp 'Excel.Application
Dim xlBook 'Excel.Workbook
dim xlSht
Dim filename, value1, value2, value3, value4

on error resume next

filename = "c:\output.xls"

Set xlApp = CreateObject("Excel.Application")
set xlBook = xlApp.WorkBooks.Open(filename)
set xlSht = xlApp.activesheet

xlApp.DisplayAlerts = False

'write data into the spreadsheet

For rowCount = 0 to 1
For colCount = 0 to 1
xlSht.Cells(rowCount, colCount) = "$RV[1]"

For rowCount = 0 to 1
For colCount = 0 to 2
xlSht.Cells(rowCount, colCount) = "$RV[2]"

xlBook.Close SaveChanges=True

set xlSht = Nothing
Set xlBook = Nothing
Set xlApp = Nothing

Sun, 22 Aug 2004 08:36:51 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Newbie question: Session_OnEnd question

2. verschl├╝sselung

3. Resizing forms question (newbie question)

4. Access97 VBA newbie question

5. Newbie Question: Understanding Syntax

6. Newbie question:

7. Newbie Questions About DAO Queries to SQL Server

8. Brand newbie questions

9. Newbie question

10. Newbie question: open file

11. vba Newbie Question

12. Newbie Question: Getting the Values from Calculated controls into a table


Powered by phpBB® Forum Software