Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


msflxgrd.ocx missing

Posted on 2005-03-02
Medium Priority
Last Modified: 2013-11-14
I wrote a VB program and then compiled to a new Standard EXE project file, which should be running on each computer by independent.

But I just found the EXE file failure when it is running on another computer.

Error message "Component 'msflxgrd.ocx' or one of it's dependencies not correctly registered: a file is missing o invalid".

1. I tried to copy "msflxgrd.ocx" from source to target computer ("C:\windows\system32), it's worked
2. Or installs Visual Basic 6.0 run-time files.

But I just want to know how to compile a VB program with "msflxgrd.ocx" into a EXE together. No need to install or copy something on target computer if possible ?

Can help please ?

Thanks !
Question by:rhinoceros
LVL 55

Expert Comment

by:Ryan Chong
ID: 13437144
Try deploy your application by creating an installer will be the proper solution.

To create an installer you can try the Package and Deployment Wizard that available on VB/Visual Studio, or else you can try some other installer packagers, like:

Inno Setup:
LVL 10

Expert Comment

ID: 13437315
u need to check the dependencies of msflxgrid.ocx..

for that ..

in the Visual Studio Tools Menu from the Start button..

Choose depends..

Choose the ocx

and it will show u the dependencies of the ocx...

so u need to add these dependencies also alongwith the ocx..

and make suer to register the dependencies first b4 the ocx..

I agree with ryancys... abt using Inno Setup instead of PDW...


Use either... Inno Setup ... but i prefer Installshield...


Expert Comment

ID: 13438361
Use can use Visual Studio Installer to create installer package. It will include all dependencies in installation package. Use Setup.exe to install on computers.

Another way is to copy the msflxgrd.ocx file on target computer and use

regsvr32 Msflxgrd.ocx

command to register Flex Grid Component.

Visual Studio Installer can be downloaded from

<A href="http://msdn.microsoft.com/vstudio/downloads/tools/vsi11/download.aspx"> http://msdn.microsoft.com/vstudio/downloads/tools/vsi11/download.aspx </A>
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 13

Author Comment

ID: 13440523
Hi friends,

But I want to run the EXE file directly without any installation on target computer...

Expert Comment

ID: 13445565
Sorry, but you can't do that. COM components are deliberately created in such a way as to prevent their functionality being directly incorporated into another program. If you happen to have a .lib or something like that you might be able to do it, but I don't think Microsoft distributes such a library file for their FlexGrid component.

Accepted Solution

MikeAngel earned 150 total points
ID: 13462156
You don't need to copy the msflxgrid.ocx to the system32 folder, you can just put it in the same folder as your app, and it works fine.
LVL 13

Author Comment

ID: 13545331
Hi MkeiAngel,

I have msflxgrid.ocx on the same folder not system folder. But when I run the EXE file, the windows installer will come out to ask me to get a file if windows office, or other windows software on computer.

The processing is :
1. VB EXE file contains a path of ocx file "C:\windows\system32\msglxgrid.ocx"
2. When EXE file is running
3. At first, windows will look for ocx file from system32 folder
4. If not, the windows installer come out
5. When installer failed to run for a few times, the EXE file will search a ocx file on same folder to running as normal.

So how to prevent the installer coming please ? or maybe some tips to reset the ocx file path ?

Any idea please ? Thanks !
LVL 10

Expert Comment

ID: 13552094
what i feel is some of the dependiencies of th msflxgrid.ocx is missing..

check for those..

u can use Depends utility for that which comes with Visual Studio..
LVL 13

Author Comment

ID: 13575815

I opened Depdns utility from the Visual Studio Tools Menu
#Choose depends..
#Choose the ocx
#and it will show u the dependencies of the ocx...

I got msflxgrid.ocx and then open it

#so u need to add these dependencies also alongwith the ocx..
#and make suer to register the dependencies first b4 the ocx..

But I don't understand what I should do  ? What's you mean "add these dependencies also along with ocx" ? Can tell me more please ?

Thanks a lot.
LVL 10

Expert Comment

ID: 13580731
actually what i mean is ..

ur setup should contain these dependencies of msflxgrid.ocx ... which needs to get registered before u register msflxgrid.ocx..

what i would suggest is ..use innosetup...or installshield

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 21 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question