Hi Paul.. (see, that was nice.. ;-) )
You are exactly right that I want to open a pre-existing file in EXCEL and append the rows to it. I am able to increment my row counter so that i don't overlay my data.. That is no problem.. My problem is kinda goofy... but, i don't know the vb command to "open" the workbook and "append" to it rather than the standard " .Workbooks.add" and " .ActiveWorkbook.Close SaveChanges:=True, FileName:="\\testexcel.xls"
I suppose that is where i need the greatest help..
I'm going to include my function code.. Rip it away..
==========================================================
Public Function BuildExcel(ByVal strCustNum As String, ByVal strSalesRep As String, _
ByVal strVkorg As String, ByVal strVtweg As String, ByVal strSpart As String, _
ByVal dtBegDate As String, ByVal dtEndDate As String, ByVal wrkprice As String, _
ByVal strMatPrGrp As String, ByVal CommPrGrp As String, ByVal wrkByUnit As String, _
ByVal strCurrency As String, ByVal strPer As String, ByVal Pricel As String, _
ByVal wrkRange As String) As Variant
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
With xlApp
.Workbooks.Add
'enter data into specific cells
.Range("A" + wrkRange).Value = strCustNum
.Range("B" + wrkRange).Value = strSalesRep
.Range("C" + wrkRange).Value = strVkorg
.Range("D" + wrkRange).Value = strVtweg
.Range("E" + wrkRange).Value = strSpart
.Range("F" + wrkRange).Value = dtBegDate
.Range("G" + wrkRange).Value = dtEndDate
.Range("H" + wrkRange).Value = wrkprice
.Range("I" + wrkRange).Value = strMatPrGrp
.Range("J" + wrkRange).Value = CommPrGrp
.Range("K" + wrkRange).Value = wrkByUnit
.Range("L" + wrkRange).Value = strCurrency
.Range("M" + wrkRange).Value = strPer
.Range("N" + wrkRange).Value = Pricel
.ActiveWorkbook.Close SaveChanges:=True, FileName:="testexcel.xls"
.Quit
End With
Set xlApp = Nothing
BuildExcel = True
End Function
===========================================================
anymore thoughts?? I *really* appreciate your help.. Let me know if this gets to be a nuisance..
Lots and lots of thanks...
Celeste..
