help with macro to export data

M

Mayte

can I use a macro to export data to another workbook? I mean, if I have data
on workbook 1, Sheet A ... can I use a macro to export all data from
"Workbook 1, Sheet A" to "Workbook 2 Sheet B" ??

Thanks,
Mayte
 
S

Stefi

Maybe you can use this macro:

Sub sheetcopy()
Workbooks("Workbook 1.xls").Sheets("Sheet A").Copy _
After:=Workbooks("Workbook 2.xls"). _
Sheets(Workbooks("Workbook 2.xls").Sheets.Count)
Workbooks("Workbook 2.xls"). _
Sheets(Workbooks("Workbook 2.xls").Sheets.Count).Name = "Sheet B"
End Sub

Regards,
Stefi


„Mayte†ezt írta:
 
M

Mayte

great ...thanks a lot !!

Cheers,
Matyte

Stefi said:
Maybe you can use this macro:

Sub sheetcopy()
Workbooks("Workbook 1.xls").Sheets("Sheet A").Copy _
After:=Workbooks("Workbook 2.xls"). _
Sheets(Workbooks("Workbook 2.xls").Sheets.Count)
Workbooks("Workbook 2.xls"). _
Sheets(Workbooks("Workbook 2.xls").Sheets.Count).Name = "Sheet B"
End Sub

Regards,
Stefi


„Mayte†ezt írta:
 

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