I have the following VBA code:
1 Cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=False
2 Next Cell
3 CopyTargetBookmark = 1
4 For Each Workbook In Application.Workbooks
This is a MUCH larger, much more confusing macro than shown here, but I have found my problem. The macro executes the code on line 1, then goes to line 2, and loops until all .Xlsx files in my range have been opened. My files are .Xlsx files in sub-folders of another folder.
WHILE the hyperlinks in line 1 are are opening (which takes longer than it sounds), the code is racing to the end before it accomplishes the task.
ALL I need are some ideas on how to break between lines 2 and 3 until all files have opened. They are not opening until I stop the script, and then they all open.
This may be a root of a bigger problem I am currently unaware of, and I would LOVE if someone explained it to me... I have read a little about VBA "passing control" to Excel so those files can open... I have no clue what that means though.
Thank You!
Peter
1 Cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=False
2 Next Cell
3 CopyTargetBookmark = 1
4 For Each Workbook In Application.Workbooks
This is a MUCH larger, much more confusing macro than shown here, but I have found my problem. The macro executes the code on line 1, then goes to line 2, and loops until all .Xlsx files in my range have been opened. My files are .Xlsx files in sub-folders of another folder.
WHILE the hyperlinks in line 1 are are opening (which takes longer than it sounds), the code is racing to the end before it accomplishes the task.
ALL I need are some ideas on how to break between lines 2 and 3 until all files have opened. They are not opening until I stop the script, and then they all open.
This may be a root of a bigger problem I am currently unaware of, and I would LOVE if someone explained it to me... I have read a little about VBA "passing control" to Excel so those files can open... I have no clue what that means though.
Thank You!
Peter