DBGrid not working in VBA

I'm working on a machine with Windows XP SP2 and MS Word 2003 SP 2. There's NO Visual Basic installed.
I open Word, then VBA, open a form, and try to create a DBGrid control. I get a Microsoft Visual Basic error message (in Spanish): "No se puede crear el control porque carece de la licencia adecuada."
In English, it's something like: "Cannot create the control because you do not have the proper license."
I have no .lic file referring to DBGrid in my system. (I don't know if I need one).
The 3 DBGrid files (DBGrid32.ocx, DBGrid32.oca, and DBGrid32.dep) are in c:\Windows\System32.
I have registered DBGrid32.ocx using Regsvr32, and I was successful, according to the message I got.
However, the problem persists. Can anybody please tell me what's going wrong, and how to solve it
Thank you very much, Jorge.

PS: The same thing happens when I try to create an MSFlexGrid control.



Answer this question

DBGrid not working in VBA

  • M.Yaseen

    I must apologize for some mistakes I made in the specifications of the problem that I gave yesterday. I'll specify it all over again:

    I'm working on a machine with Windows XP SP2 and MS Word 2003 SP 2. Visual Basic is NOT installed, and it's never been.
    I open Word, then go to "Macros", which opens VBA. Then I open a form, and try to create a DBGrid control. I get a Microsoft Visual Basic error message (in Spanish): "No se puede crear el control porque carece de la licencia adecuada."
    In English, it's something like: "Cannot create the control because you do not have the appropriate license."

    The DataGrid file is msdatgrd.ocx. It's located in c:\windows\system32. Its version is 6.0.84.18.

    There's no other "msdatgrd" file in my machine. For instance, there is no msdatgrd.lic or msdatgrd.dep. I don’t know if I need any of them. And in case I do need them, I don’t know why they’re not in my machine.

    I have successfully registered msdatgrd.ocx with regsvr32, yet it doesn't work.

    Can anybody please give me any ideas to work around this problem

    Thank you very much, Jorge.


  • Grayson Peddie

    Hi, I am Spanish. Oye, si eres espanol, mandame un mail si has solucionado eso. A mi me pasa igual.

    I have the same error Sad(((((

    some solution


  • DBGrid not working in VBA