esmyhs
asked on
Failed to load control 'MSFlexGrid' from MSFlxGrd.Ocx.
I have been using VB6 for a long time. A while back I started getting the following message when opening up projects in VB6 that contain a FlexGrid:
Failed to load control 'MSFlexGrid' from MSFlxGrd.Ocx. Your version of MSFlxGrd.Ocx may be outdated. Make sure you are using the version of the control that was provided with your application.
I have tried unregistering and reregistering msflxgrd.ocx. I tried reinstalling Service Pack 6. The project runs fine in VB6, but I'm not sure why I am getting this error.
Any advice?
Failed to load control 'MSFlexGrid' from MSFlxGrd.Ocx. Your version of MSFlxGrd.Ocx may be outdated. Make sure you are using the version of the control that was provided with your application.
I have tried unregistering and reregistering msflxgrd.ocx. I tried reinstalling Service Pack 6. The project runs fine in VB6, but I'm not sure why I am getting this error.
Any advice?
try to remove the component from project and add it again.
if it is not work you can try to edit the vbp file in notepad and delete the line
Object={5E9E78A0-531B-11CF -91F6-C286 3C385E30}# 1.0#0; MSFLXGRD.OCX
and save it
ope project in VB and add the control again, and try
Object={5E9E78A0-531B-11CF
and save it
ope project in VB and add the control again, and try
ASKER
Trying your first solution gives me the following error (since I am using the control on multiple forms):
Can't remove control of reference; In use
The second solution doesn't seem to fix the problem either.
Can't remove control of reference; In use
The second solution doesn't seem to fix the problem either.
It is doing the same?
you can try one more thing:
open new project and add the flexgrid here, save it
open the vbp file in notepad and copy the flexgrid object line to your project... can you paste the old one project file here please?
you can try one more thing:
open new project and add the flexgrid here, save it
open the vbp file in notepad and copy the flexgrid object line to your project... can you paste the old one project file here please?
ASKER
When I try to add a FlexGrid to a new project it adds fine to the form. When I try to run the project, it gives me an "Unexpected Error". When I Click OK it gives me the following error:
Error loading 'C:\DOCUME~1\USER\LOCALS~1 \Temp\VB1D 3.tmp'. A control could not be loaded due to load error. Continue?
When I click ok, it shows me the form with the FlexGrid in red.
I don't believe that the problem is with my project because I get the other error in all of my projects that have a FlexGrid in them. It must be something with the control.
Error loading 'C:\DOCUME~1\USER\LOCALS~1
When I click ok, it shows me the form with the FlexGrid in red.
I don't believe that the problem is with my project because I get the other error in all of my projects that have a FlexGrid in them. It must be something with the control.
what do you use as operating system?
If you are using vista or 7, run the VB as administrator (right click on icon of VB and click run as administrator) even if you administrator already. This can be caused by UAC
and/or
Go to that directory and see whats wrong - security etc.. Best way is to delete all files there ;-) and check the directory settings
If you are using vista or 7, run the VB as administrator (right click on icon of VB and click run as administrator) even if you administrator already. This can be caused by UAC
and/or
Go to that directory and see whats wrong - security etc.. Best way is to delete all files there ;-) and check the directory settings
ASKER
I am using Windows XP. I don't know if it makes a difference but I also have Visual Studio 2008 installed.
It is no problem with VS2008 I have the same configuration and flexgrid Im using almost every day. What about the security in temp folder?
ASKER
I erased everything in the directory. Still no good.
I'm not sure what you mean by security. Nothing has been changed as far as I remember.
I'm not sure what you mean by security. Nothing has been changed as far as I remember.
if you click on the tem directory by right button, there is properties and tab security. ensure that you have full access to it
ASKER
There is no Security Tab in properties on the Temp folder.
are you using FAT or NTFS filesystem?
ASKER
NTFS
maybe you have turned on the easy filesharing or you have XP home edition... This setting is in options where you can show hidden files and so on...
ASKER
I have XP Home.
You can try to do chkdsk of your disk, maybe there is something corrupted... I thing problem resides in the tmp file that cant be modified or deleted
ASKER
Chkdsk did not fix the problem.
It may be that Microsoft is the culprit. Check the "Microsoft Critical Update KB960715". This update prevents Active X controls from working. In Control Panel / Add Remove Programs (show updates), go to the update, then click on the link to get to the Microsoft site. The explanation is there, along with some remedies.
Leon
Leon
ASKER
I don't have "Microsoft Critical Update KB960715" installed.
Its not the only one that is known to do this.
Leon
Leon
ASKER
Do you know of a way to narrow it down?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've tried all of the solutions at http://www.tek-tips.com/viewthread.cfm?qid=1530759, and it still doesn't work.
I get the same error as before, when opening a project that has a Flexgrid on one if the forms.
If I add a FlexGrid to a new form (in a new project) and try to run it, I get an "Unexpected Error".
I get the same error as before, when opening a project that has a Flexgrid on one if the forms.
If I add a FlexGrid to a new form (in a new project) and try to run it, I get an "Unexpected Error".
Do you have another PC to test the VB code on?
Leon
Leon
ASKER
The VB Code works fine on another computer.
Then its definently a machine specific problem as described above, although chasing it down will mostly like proove to be impossible.
Leon
Leon
ASKER
Do you think uninstalling and reinstalling VB will do anything to help?
There is a very, very small possibility that it will. But, I think the issue is outside VB or VB code.
Leon
Leon
ASKER
Unistalling and reinstalling VB did not work. I also tried to extract the flexgrid.ocx from the SP6 upgrade. That didn't work either.
Yeap
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem. I do not care about the points but lets not delete the question.
Leon
Leon
ASKER
I am not trying to delete the question. I just wanted it to be closed. I would love to give the points to you, because you've been very patient. I just don't want to accept something as the solution that wasn't, because I don't want to mislead someone else who might have the same problem.
Thats fine, this question can be closed with your post 25894363 as a solution. Is that ok?
ASKER
If there is a way to close it with my post as the solution and your post 25809062 as the assisted solution (with the points assigned to you), that would be ok as well.