Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 13 in 'WorkBooks.open'
I distribute by Internet a free program and sometimes it happens the
strange error that I describe: I have an Excel workbook and one of the macros open another workbook. I do not know why, when the macro open the second workbook, some times, occurs an "error 13". Somebody has idea that it can happen? Dim FileToOpen1 As String FileToOpen1 = "C:\Files\ExcelData.xls" Workbooks.Open Filename:=FileToOpen1 Thanks in advance. Zayas |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 13 in 'WorkBooks.open'
#13 is a type mismatch error, I doubt directly raised on the Workbooks.Open
line but somewhere else. If you haven't included an error handler normally the code will break on the problematic code line. Regards, Peter T "Zayas" wrote in message ... I distribute by Internet a free program and sometimes it happens the strange error that I describe: I have an Excel workbook and one of the macros open another workbook. I do not know why, when the macro open the second workbook, some times, occurs an "error 13". Somebody has idea that it can happen? Dim FileToOpen1 As String FileToOpen1 = "C:\Files\ExcelData.xls" Workbooks.Open Filename:=FileToOpen1 Thanks in advance. Zayas |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 13 in 'WorkBooks.open'
On 14 dic, 12:54, "Peter T" <peter_t@discussions wrote:
#13 is a type mismatch error, I doubt directly raised on the Workbooks.Open line but somewhere else. If you haven't included an error handler normally the code will break on the problematic code line. Regards, Peter T "Zayas" wrote in message ... I distribute by Internet a free program and sometimes it happens the strange error that I describe: I have an Excel workbook and one of the macros open another workbook. I do not know why, when the macro open the second workbook, some times, occurs an "error 13". Somebody has idea that it can happen? Dim FileToOpen1 As String FileToOpen1 = "C:\Files\ExcelData.xls" Workbooks.Open Filename:=FileToOpen1 Thanks in advance. Zayas- Ocultar texto de la cita - - Mostrar texto de la cita - I have an error handler. It seems incredible but it gives error 13 (type mismatch) in the 'Workbooks.Open Filename:=FileToOpen1' line. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 13 in 'WorkBooks.open'
If you have error handling set to "Trap Unhandled Errors" (in VBA,
Tools menu, Options item, General tab) and an error occurs in an object module (a Class, UserForm, or Sheet or ThisWorkbook module), VBA marks the line that called the object module as being in error, even though the actual error occurred in the object module. For example, if you have code in Class1 that causes an error, the code in a standard module that called the code in Class1 will be marked as the error. This can mask the true source of the error. You should always run your code with the "Break In Class Module" option in effect. This causes VBA to show the error in the object module, where it really occurred, rather than in the calling code. Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Sun, 14 Dec 2008 04:07:03 -0800 (PST), Zayas wrote: On 14 dic, 12:54, "Peter T" <peter_t@discussions wrote: #13 is a type mismatch error, I doubt directly raised on the Workbooks.Open line but somewhere else. If you haven't included an error handler normally the code will break on the problematic code line. Regards, Peter T "Zayas" wrote in message ... I distribute by Internet a free program and sometimes it happens the strange error that I describe: I have an Excel workbook and one of the macros open another workbook. I do not know why, when the macro open the second workbook, some times, occurs an "error 13". Somebody has idea that it can happen? Dim FileToOpen1 As String FileToOpen1 = "C:\Files\ExcelData.xls" Workbooks.Open Filename:=FileToOpen1 Thanks in advance. Zayas- Ocultar texto de la cita - - Mostrar texto de la cita - I have an error handler. It seems incredible but it gives error 13 (type mismatch) in the 'Workbooks.Open Filename:=FileToOpen1' line. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 13 in 'WorkBooks.open'
On 14 dic, 14:57, Chip Pearson wrote:
If you have error handling set to "Trap Unhandled Errors" (in VBA, Tools menu, Options item, General tab) and an error occurs in an object module (a Class, UserForm, or Sheet *or ThisWorkbook module), VBA marks the line that called the object module as being in error, even though the actual error occurred in the object module. For example, if you have code in Class1 that causes an error, the code in a standard module that called the code in Class1 will be marked as the error. This can mask the true source of the error. You should always run your code with the "Break In Class Module" option in effect. This causes VBA to show the error in the object module, where it really occurred, rather than in the calling code. Cordially, Chip Pearson Microsoft MVP * * Excel Product Group Pearson Software Consulting, LLCwww.cpearson.com (email on web site) On Sun, 14 Dec 2008 04:07:03 -0800 (PST), Zayas wrote: On 14 dic, 12:54, "Peter T" <peter_t@discussions wrote: #13 is a type mismatch error, I doubt directly raised on the Workbooks..Open line but somewhere else. If you haven't included an error handler normally the code will break on the problematic code line. Regards, Peter T "Zayas" wrote in message .... I distribute by Internet a free program and sometimes it happens the strange error that I describe: I have an Excel workbook and one of the macros open another workbook.. I do not know why, when the macro open the second workbook, some times, occurs an "error 13". Somebody has idea that it can happen? Dim FileToOpen1 As String FileToOpen1 = "C:\Files\ExcelData.xls" Workbooks.Open Filename:=FileToOpen1 Thanks in advance. Zayas- Ocultar texto de la cita - - Mostrar texto de la cita - I have an error handler. It seems incredible but it gives error 13 (type mismatch) in the 'Workbooks.Open Filename:=FileToOpen1' line.- Ocultar texto de la cita - - Mostrar texto de la cita - Thank you very much, I will do it. Zayas |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error handling on Workbooks.Open | Excel Programming | |||
Error trap on Workbooks.Open | Excel Programming | |||
workbooks.open and error handling | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
error on oXL.Workbooks.Open | Excel Programming |