Hello,
Due to little knowledge, I wrote this code by analyzing the macro recorded earlier. The (probably trivial) error I can't deal with is that I am not copying data from the batch file, but the macro is executing on the file I run it from. Probably something needs to be added after the command to open the file, but although my head and three do not know what; (
Due to little knowledge, I wrote this code by analyzing the macro recorded earlier. The (probably trivial) error I can't deal with is that I am not copying data from the batch file, but the macro is executing on the file I run it from. Probably something needs to be added after the command to open the file, but although my head and three do not know what; (
Private Sub CommandButton1_Click()
Workbooks.Open Filename:="C:\Users\mm\Desktop\Nowy_folder\wsad.xlsx"
Range("A:A").Copy
ThisWorkbook.Activate
Sheets("Arkusz2").Activate
Range("B1").Select
ActiveSheet.Paste
Workbooks("wsad.xlsx").Close
End Sub