Hello:
I need to create a button in an InfoPath 2003 form that will insert the data into an existing excel spreadsheet.
I found this code that will do exactly what I want but I need it in jscript (I didn't set programming language to
VB prior to creating form, 2007 will remove code but haven't found how to do so in 2003):
__________________________________________________ __________________________________________________ _
Answer
You can try this variation of the code:
Sub CopySelection()
Selection.Copy
Windows("Destination.xls").Activate
With Sheets("Sheet1").Range("A1").CurrentRegion.End(xlD own)
.Offset(1, 0).Select
ActiveSheet.Paste
.Offset(1, 0).Value = .Value + 1
End With
End Sub
This can give an error if the value of column A is not a number, but this shouldn't be the case.
Hope this helps,
Miguel
__________________________________________________ __________________________________________________ ___
Can someone provide much the same in jscript?
Thanks,
Mary Potter
Mary Potter