Hey,
I know similar things have been posted before, but i can't find out exactly how to do my problem.
I have an excel template, with a header (to make it look pretty). Basically I need all the data to be entered starting from cell A3. The data is coming from a form which is run off of a query. Currently I have something like this
Dim xlobj As Excel.Application
Set xlobj = CreateObject("excel.application"
With xlobj
.Workbooks.Open Filename:="C:\WINDOWS\Desktop\CableScheduleTemplate.xlt"
.Range("A3"
.Select
.ActiveCell.FormulaR1C1 = CableID
.Range("B3"
.Select
.ActiveCell.FormulaR1C1 = CableType
.Range("C3"
.Select
.ActiveCell.FormulaR1C1 = FromLocation
.Range("D3"
.Select
.ActiveCell.FormulaR1C1 = FromUnit
.Range("E3"
.Select
.ActiveCell.FormulaR1C1 = FromTermination
.Range("F3"
.Select
.ActiveCell.FormulaR1C1 = FromWiringDetail
.Range("G3"
.Select
.ActiveCell.FormulaR1C1 = ToLocation
.Range("H3"
.Select
.ActiveCell.FormulaR1C1 = ToUnit
.Range("I3"
.Select
.ActiveCell.FormulaR1C1 = ToTermination
.Range("J3"
.Select
.ActiveCell.FormulaR1C1 = ToWiringDetail
.Range("K3"
.Select
.ActiveCell.FormulaR1C1 = CableFunction
'and so on
.Quit
This only puts the first record into the selected rows though.
Any ideas would be very appreciated.
Thanks
Sam
"You couldn't fool your mother on the foolingest day of your life if you had an electrified fooling machine." - Homer
I know similar things have been posted before, but i can't find out exactly how to do my problem.
I have an excel template, with a header (to make it look pretty). Basically I need all the data to be entered starting from cell A3. The data is coming from a form which is run off of a query. Currently I have something like this
Dim xlobj As Excel.Application
Set xlobj = CreateObject("excel.application"
With xlobj
.Workbooks.Open Filename:="C:\WINDOWS\Desktop\CableScheduleTemplate.xlt"
.Range("A3"
.ActiveCell.FormulaR1C1 = CableID
.Range("B3"
.ActiveCell.FormulaR1C1 = CableType
.Range("C3"
.ActiveCell.FormulaR1C1 = FromLocation
.Range("D3"
.ActiveCell.FormulaR1C1 = FromUnit
.Range("E3"
.ActiveCell.FormulaR1C1 = FromTermination
.Range("F3"
.ActiveCell.FormulaR1C1 = FromWiringDetail
.Range("G3"
.ActiveCell.FormulaR1C1 = ToLocation
.Range("H3"
.ActiveCell.FormulaR1C1 = ToUnit
.Range("I3"
.ActiveCell.FormulaR1C1 = ToTermination
.Range("J3"
.ActiveCell.FormulaR1C1 = ToWiringDetail
.Range("K3"
.ActiveCell.FormulaR1C1 = CableFunction
'and so on
.Quit
This only puts the first record into the selected rows though.
Any ideas would be very appreciated.
Thanks
Sam
"You couldn't fool your mother on the foolingest day of your life if you had an electrified fooling machine." - Homer