View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
moonhk[_2_] moonhk[_2_] is offline
external usenet poster
 
Posts: 36
Default Workbooks.Open always have

Hi All

Excel 2007

Sub OpenFile_USER_LIST()

On Error Resume Next
Dim i As Integer
Dim returnValue As Workbook
returnValue = Workbooks.Open(Filename:="D:\files\User_List.xlsx" )
End Sub


When Run above code prompted "Code execution has been interruped" .
Why this happened ?
This worksheet without any VBA.


End Sub <---- Error here

This procedure called by Menu Command or run in Modules.

Run 2nd/3rd time have error Code execution has been interruped