Moving data from one workbook to another workbook

M

Mike Rogers

I have two workbooks, one of them is a template for invoices and the other is
for tracking those invoices. When I need an invoice I go to “Invoice09†and
open a new workbook, fill it in and “saveasâ€. I use the address and apartment
number as the file name. I then go to “Invoice totals†and enter the data
into the appropriate cells. I would like to automate the process of saving
as the address and apartment number and moving the data from the newly
created invoice to the Invoice totals workbook. The layout of the key cells
are: C19 is the address, C20 is the apartment number, K6 is the date, and L52
is the total for that invoice. In the Invoice totals workbook the key cells
are: Column B is the Saved AS file name, Column C is the invoice date, and
Column D is the total for each invoice. I really wish I spoke vba but….. I
don’t. Can some one help me out with some direction?

Mike Rogers
 
M

Mike Rogers

I solved the first part of getting the file saved as the address. The only
thing I did not really get worked out was the code to save it to the correct
folder. I just changed my default under tools options etc. I code I have so
far is posted below.


Private Sub CommandButton1_Click()
Dim rng As Range

Set rng = ActiveSheet.Range("N17")

ActiveWorkbook.SaveAs _
Filename:=rng.Value & ".xls", _
FileFormat:=xlWorkbookNormal
End Sub

Mike Rogers
 

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