csokosdama
New Member
- Joined
- Jan 12, 2015
- Messages
- 4
Hi everyone,
I'm trying to call in the parent Workbook (test) a sub in another Workbook (test2). This sub is supposed to insert a new line the test2. That is where the code is originally located. If I run the code seperately it works fine. If I try to call it from test, it doesn't. Do you have any solutions?
Thank you very much!
test.xlsm:
Sub testing()
Application.Run "test2.xlsm!Sheet1.newline()"
End Sub
test2.xlsm:
Sub newline()
Rows("5:5").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub
I'm trying to call in the parent Workbook (test) a sub in another Workbook (test2). This sub is supposed to insert a new line the test2. That is where the code is originally located. If I run the code seperately it works fine. If I try to call it from test, it doesn't. Do you have any solutions?
Thank you very much!
test.xlsm:
Sub testing()
Application.Run "test2.xlsm!Sheet1.newline()"
End Sub
test2.xlsm:
Sub newline()
Rows("5:5").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub