Moving data to another file - help needed

J

JTWarthogs

I would like to trasfer a number from a cell in one file (worksheet) to
another and keep populatiing the next cell. I wanted to use a command button
to tranfer the numbers. For example

From: File ="POS 4-20-09", transfer cell = A1, Sheet = 1 (Lets say value =
100)
To: File = Data Master, Cell = A1, Sheet = "sum" (cell A1 now has 100)

Now the next day I hit the button
From: File ="POS 4-21-09", transfer cell = A1, Sheet = 1 (Lets say value =
500)
To: File = Data Master, Cell = A2(the next open cell), Sheet = "sum" (cell
A2 now has 500)

I will already have the days sheet open say "POS 4-21-09 so I just need to
have it send that A1 value to "Data Maseter" and put it in the next open
cell. I can even open that file as well if needed.

Can someone help me?
Thanks
 
J

joel

Folder = "C:\temp\
FName = "Master.xls"

Set Mstbk = workbooks.open(filename:=folder & FName)
with Mstbk.sheets("Sum")
LastRow = .Range("A" & Rows.Count).end(xlup).row
NewRow = LastRow + 1
thisworkbook.ActiveSheet.Range("A1").Copy _
Destination:=.Range("A" & NewRow)
end with

Mstbk.close savechanges:=true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top