ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   access violation 0cx0000005 in vba excel (https://www.excelbanter.com/excel-programming/282382-access-violation-0cx0000005-vba-excel.html)

ngm

access violation 0cx0000005 in vba excel
 

Dear recipient:

I have this error access violatio 0cx0000005 to open file excel,
generate this file in code vba.Don't have idea where is the error.

I have a next code fragment

For p = 0 To num_pems - 1
Workbooks(libro_paquete).Activate
Sheets("MFisicas " & pems(p)).Select
MsgBox "pem i" & pems(p)
Sheets("MFisicas " & pems(p)).Delete
Next
Application.DisplayAlerts = True


Workbooks(libro_paquete).Save
Workbooks(libro_paquete).Close

if elimite the sentence for to open file correct.

Can you help me please?

Regards

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com



All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com