Excel macro that doesn't work from one computer to another
hogun
-
pop421 Posted messages 8 Status Membre -
pop421 Posted messages 8 Status Membre -
Hello,
I am currently stuck with a macro in Excel 2010 that works on my PC but not on my colleague's PC.
I have checked that
- the file references (it is a macro that copies cells from one workbook to another) are identical.
- the macro security settings are the same on both PCs.
- the references and add-ins for the macros are the same.
For your information, these are exactly the same PCs with the same licenses for Windows 7 and Office 2010. The macro worked perfectly in Excel 2007.
I admit I'm a bit stuck.
If anyone has an idea to suggest, I’m open to it. I don’t think it’s a code issue since it works perfectly on my machine. Or am I mistaken?
For your information, on my colleague's PC, the macro stops after copying the first column and halts completely before moving to the second one with the error message "the index is out of range."
Thank you in advance.
Configuration: Windows 7 / Internet Explorer 7.0
I am currently stuck with a macro in Excel 2010 that works on my PC but not on my colleague's PC.
I have checked that
- the file references (it is a macro that copies cells from one workbook to another) are identical.
- the macro security settings are the same on both PCs.
- the references and add-ins for the macros are the same.
For your information, these are exactly the same PCs with the same licenses for Windows 7 and Office 2010. The macro worked perfectly in Excel 2007.
I admit I'm a bit stuck.
If anyone has an idea to suggest, I’m open to it. I don’t think it’s a code issue since it works perfectly on my machine. Or am I mistaken?
For your information, on my colleague's PC, the macro stops after copying the first column and halts completely before moving to the second one with the error message "the index is out of range."
Thank you in advance.
Configuration: Windows 7 / Internet Explorer 7.0
11 réponses
Hi,
It's strange if it works on your colleague's computer, but maybe check with the network manager to see if there are any restrictions on this computer.
--
See you,
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
It's strange if it works on your colleague's computer, but maybe check with the network manager to see if there are any restrictions on this computer.
--
See you,
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
Hello,
below is the link to a text file containing the code of the problematic macro.
Sorry, however, I cannot share the files it applies to, as they contain confidential data.
http://cjoint.com/?DEfrqAqJQer
Thank you for your help.
below is the link to a text file containing the code of the problematic macro.
Sorry, however, I cannot share the files it applies to, as they contain confidential data.
http://cjoint.com/?DEfrqAqJQer
Thank you for your help.
Hello,
It would have been better to have your file rather than your macro in TXT,
It's certainly your security level that is too high, so to test, you will do the following,
to temporarily lower the level, click on the Developer tab/in the Code module click on macro security/in macro settings, check Enable all macros (not recommended etc ...)
save the file before closing it and reopening it/accept the macros
then I advise you to sign your codes and raise the security level, to do this
click on all programs/Microsoft Office/Microsoft Tools/click on digital certificate for VBA projects
give a friendly name to your signature, or your name, or your first name, whatever
open the file I sent back to you and go to Visual Basic that you can open by pressing Alt and F11
click on Tools/Digital Signature/Choose/select the name of the signature you created/and OK
save your file close it and open it again/allow the macros
I have written the entire procedure on this link
https://www.commentcamarche.net/faq/21009-excel-signature-numerique
--
See you later
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
It would have been better to have your file rather than your macro in TXT,
It's certainly your security level that is too high, so to test, you will do the following,
to temporarily lower the level, click on the Developer tab/in the Code module click on macro security/in macro settings, check Enable all macros (not recommended etc ...)
save the file before closing it and reopening it/accept the macros
then I advise you to sign your codes and raise the security level, to do this
click on all programs/Microsoft Office/Microsoft Tools/click on digital certificate for VBA projects
give a friendly name to your signature, or your name, or your first name, whatever
open the file I sent back to you and go to Visual Basic that you can open by pressing Alt and F11
click on Tools/Digital Signature/Choose/select the name of the signature you created/and OK
save your file close it and open it again/allow the macros
I have written the entire procedure on this link
https://www.commentcamarche.net/faq/21009-excel-signature-numerique
--
See you later
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
Hello Mike-31,
the object of the offense is this:
The macro worked perfectly under Excel 2007.
said hogun
FichierReleve = "RELEVECARTEAFF0414"
Workbooks(FichierReleve).Activate
even in Excel 2007 it cannot work because the file extension is missing
the object of the offense is this:
The macro worked perfectly under Excel 2007.
said hogun
FichierReleve = "RELEVECARTEAFF0414"
Workbooks(FichierReleve).Activate
even in Excel 2007 it cannot work because the file extension is missing
Hi f894009,
I didn't bother to read the TXT file, let alone convert it to Excel to test it and see the line in error, especially since it seemed to work under 2007, so there's no reason it shouldn't work under 2010 unless there's a security issue. But as you said so well, regardless of the version, I doubt the code works as it is.
Best regards
--
A+
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
I didn't bother to read the TXT file, let alone convert it to Excel to test it and see the line in error, especially since it seemed to work under 2007, so there's no reason it shouldn't work under 2010 unless there's a security issue. But as you said so well, regardless of the version, I doubt the code works as it is.
Best regards
--
A+
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
Hello everyone,
First of all, thank you for your responses, and sorry for the delay in my reply (time off + public holidays).
I indeed lean towards a security issue, but which one? Knowing that I even went as far as allowing all macros to try to get it to work. And that didn't change anything.
I also did a test: I logged into my colleague's PC with my credentials and ran the macro without any issues.
I'm therefore heading towards a user profile/rights issue and will try to see this with the company's network manager to see if there is a security/profile rights issue involved as well.
What do you think?
First of all, thank you for your responses, and sorry for the delay in my reply (time off + public holidays).
I indeed lean towards a security issue, but which one? Knowing that I even went as far as allowing all macros to try to get it to work. And that didn't change anything.
I also did a test: I logged into my colleague's PC with my credentials and ran the macro without any issues.
I'm therefore heading towards a user profile/rights issue and will try to see this with the company's network manager to see if there is a security/profile rights issue involved as well.
What do you think?
Hello,
Just passing by, does your colleague have access rights to the following network directories:
\\FRSV01\comptabilite\Administratif\Administratif New\NOTE DE FRAIS\NOTE DE FRAIS 2014.xls"
To find out:
In File Explorer:
- right-click on the file "NOTE DE FRAIS 2014.xls",
- Properties,
- Security tab,
In the window, the Names of groups or users should show only the users authorized to access this file.
If she is listed there, also check that she has access to Modify, Read, Write...
If not, please contact your network administrator.
Best regards,
Franck
Just passing by, does your colleague have access rights to the following network directories:
\\FRSV01\comptabilite\Administratif\Administratif New\NOTE DE FRAIS\NOTE DE FRAIS 2014.xls"
To find out:
In File Explorer:
- right-click on the file "NOTE DE FRAIS 2014.xls",
- Properties,
- Security tab,
In the window, the Names of groups or users should show only the users authorized to access this file.
If she is listed there, also check that she has access to Modify, Read, Write...
If not, please contact your network administrator.
Best regards,
Franck