RUN-TIME ERROR-Excel 2003

The problem:
We can see that the user was having problem to run a macro in a Microsoft Excel 2003 file, which used some of the references to the Progresses.
Whenever the user ran the macro, was displayed the following error message:

Error message text:
“---------------------------
Microsoft Visual Basic for Applications
---------------------------
RUN TIME ERROR ' -2147312566 (80029c4a)

Unable to move the focus to the control because it is invisible, not enabled, or is of type that does not accept the focus.
---------------------------
Order Debug Help
---------------------------“
Error message in image:













Solution
Analyzing the file structure and references of the Progresses we find that the reference to the "Microsoft Windows Common Controls 6.0 (SP6)" was with the status "MISSING".

See the step by step to solve the problem mentioned in the above image:

1. click CLOSE in the error message and close completely your Excel file
2. open the file it is showing the error;
3. open with Excel, press Alt + F11 to open the Microsoft Visual Basic
4. in the VBA editor, click the Toolsmenu, References.



5. click on Browse ... 




6. the Add Reference dialog box appears, locate the C:\Windows\System32 folder (on W7, the folder isSysWOW64 C:\Windows\)
7. open the file MSCOMCTL.OCX -to do this, change the display type of the file as the image below:




8. then click on the file MSCOMCTL.OCX and Open.
9. a reference to the Microsoft Windows Common Controls 6.0 (SP6) is added in the References-VBAProject dialog box.
10. click OK , and then test with the user.

Comentários

LEIA-ME

Criar ferramentas e scripts que facilitam seu trabalho no dia a dia, solucionar problemas, documentar tudo e criar o passo a passo de como resolver, é uma tarefa que requer tempo e disposição. Por esse motivo, precisamos de sua contribuição.




Apesar de não ser obrigatória, a sua doação é muito importante para continuarmos criando ferramentas, scripts e procedimentos!
Com sua contribuição manteremos o funcionamento e desenvolvimento dessas e outras soluções.