View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Graham Whitehead Graham Whitehead is offline
external usenet poster
 
Posts: 72
Default Macro newbie - simple copy/paste function

Hopefully this should get you started:

Sub test()

Dim x As Long
Dim ValueC2 As Variant
'get value from cell C2
Windows("survey.xls").Activate
ValueC2 = Range("C2").Value
'activate workbook to put value into
Windows("results.xls").Activate
'find next empty row
With ActiveSheet
x = .Range("A65536").End(xlUp).Row
End With
'put value in
Range("A" & x).Value = ValueC2

End Sub

"Nat" wrote in message
...
Hi,

I have absolutely no knowledge of macro programming and am usually able to
find how to do things with the Office help but this time: not!

Here is what I would like to do:
I created an excel form (not using forms functions but simply locking
cells). I send this form to be filled-out and I would like to compile it
automatically in another xls.

I need a function that would copy cell C2 from "survey.xls" and paste (w/o
format) to the next empty line of row A in "results.xls" and so forth and
so
on.

Can anyone point me in the right direction please? I am at a lost here.

Also, can someone suggest a simple book for a macro-newbie like me?

Thank you.