Copying data from workbook to workbook using button

Solved/Closed
Report
-
 Blocked Profile -
Hello guys nad ladies,
I have a problem, i hope you can help me.
I have an excel worksheet (2 columns, 7 rows)
It's kind of daily statistics (emails in and out, cases solved, new cases etc.). I want my colleagues to put data there, click button "send" and data from second column they input will appear in another excel file in exactly row with their names and date in the beginning (some kind of daily update).
Could you provide me with code for this button?
If you need further details please do not hesitate to ask me.
Thank you!

1 reply


OK, well here is the code.

We do not provide turn key solutions. Tweek this simple code to do the real details of what you are asking. Use the below cut and paste as a wireframe, and modify it to fit your needs!


Sub copytoanewfile()
'
' copytoanewfile Macro
' Macro recorded 9/29/2015 by onebaddass mf'r
'

'
Range("B2:B8").Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\here_is_the\filepath\and-the\filename.xls"
Range("B23").Select
ActiveSheet.Paste
End Sub




All I did was record a macro, now just tweek it to fit your needs!
Yeah, thanks for this base :) still upgrading it :)
But I can't invent how to write a command to save and close active worksheet.
Any ideas?
Blocked Profile
Try

ActiveWorkbook.Save

or

Workbooks("BOOK1.XLS").Close SaveChanges:=False
Blocked Profile
@Sri - There are more than one way to skin a cat!