This is driving me insane. I cannot figure out why this doesn't continue running. Once it's run it will open the file and then stop. It will only run again if I put a break right before opening the file and hit F8 to get it through, then I can let it continue with F5. This makes no sense to me!!
edit: OK, it seems to be an issue with using a shortcut key to start it. If I run it manually this doesn't happen.
Code
Public Sub LoadData()
Dim fcell As Range, ncell As Range, row As Integer, col As Integer
Dim cellval As String, wb As Workbook, clarioBook As Workbook, clarioFile As String, ws As Worksheet
Set wb = ActiveWorkbook
clarioFile = Open_File
Set clarioBook = Workbooks.Open(clarioFile)
' randomly stops here using the same file that works, no error given
Set ws = wb.Sheets.Add
ws.Name = Left(clarioBook.Name, 31)
clarioBook.Sheets(1).Range("A:AC").Copy Destination:=wb.Sheets(1).Range("A:AC")
clarioBook.Close SaveChanges:=False
End Sub
Display More