Copying data from workbook to workbook using button

Solved/Closed
Oxy - Sep 29, 2015 at 11:55 AM
 Blocked Profile - Oct 7, 2015 at 06:09 PM
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 response

Blocked Profile
Sep 29, 2015 at 05:14 PM
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!
0
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?
0
Blocked Profile
Sep 30, 2015 at 04:57 PM
Try

ActiveWorkbook.Save

or

Workbooks("BOOK1.XLS").Close SaveChanges:=False
0
Blocked Profile
Oct 7, 2015 at 06:09 PM
@Sri - There are more than one way to skin a cat!
0