I am working on a 2 workbooks. The first is my main workbook where data gets filled. The second is a workbook where data of the main book gets copied to. Since I work on different computers I created a sheet in the fist workbook containing the filenames and locations. I created a macro in the main to get the location and then using that info to open the second workbook. It worked for a while and now the macro stops every time on the same line.
Below a part of my Macro
Sub Create_Highlight()
'
' Ad a VOC Customer Meeting to the sheet
'
Dim Location As String
Dim WB1 As Workbook
Dim WB2 As Workbook
Application.ScreenUpdating = False
Location = Sheets("User").Range("D33")
'Capture current Workbook
Set WB1 = ActiveWorkbook
Sheets("User").Visible = True
'Capture target Workbook
Set WB2 = Workbooks.Open(Location)
WB2.Activate
When I check the variable Location the information is correct. As said before, it worked but I don't understand why it is not working anymore. First I had the locations hardcoded in there. Obviously that works as well. But I made it first for me, and now coworkers are using it also (with the hardcoded locations) and I want/need more flexibility. I checked the website and maybe the answer is already on here, I did not find it.