Since I didnt find a similar question here or at any other board, I decided to open a new question.
I have a very basic macro, like this:
Sub test()
Dim path as String
Dim filename as String
path = Range("path_name").Value
filename= Range("filename_name").Value
Workbooks.Open Filename:=path & filename
Sheets("XF").Select
Cells.Select
Selection.Copy
End Sub
The new datafile which is opened executes a new macros, which only inserts a date in one cell, thats it. If I execute the macro step by step it works fine. If I execute it at once it shows an hold-mode error just before ("Sheets("XF").Select"). I think its somehow stuck after it opened the new datafile(.xls). I assume that it executes the new macro and simultaneously wants to continue the original macro which of course doesnt work.
I tried to use a wait method before "Sheets("XF").Select" which did not work.
I use Excel 2016. The format of the main data file is XSML and the format of the data file which is opened is XSL.
Sorry, I cannot share my original skript. I hope you have any suggestions how the problem can be solved.
Sorry, if I made any basic mistakes at this board, since it is my first post.
Best regards, Hendrik