PDA

View Full Version : how to add a control to the aditional controls available?



maryam
04-25-2007, 05:28 AM
In tools/ additional controls I need to add Microsoft DataGrid Control to the available controls. I mean it is not on my pc. the location is C:\WINDOWS\system32\MSDATGRD.OCX. I copy this file from the location in my friend's pc and paste it in the same location in my pc and restart my pc, but still that control doesnt come to the list of available controls so that I can select the item.:help :help :help :help :help :help :help :help :help :help :help

Charlize
04-25-2007, 06:01 AM
You have to register it in windows. Try this after choosen run in windows. type : regsvr32 C:\WINDOWS\system32\MSDATGRD.OCX and hit enter. Maybe you are lucky and a message pops up that this control is registered.

Charlize

ps. no vba just to separate the command from the rest of the text.

johnske
04-25-2007, 06:35 AM
Look for the Control > More Controls in your Toolbox Control commandbar (icon is a crossed hammer & spanner) then scroll down and select "Register Custom control". This brings up the Browse dialog box - browse for the control you wish to Register and select it - that's it.

maryam
04-25-2007, 10:05 PM
Johnski do you mean to select it from the listbox in additional controls. It is not there. I could not find "register Custom Control"! hammer and spanner icon is view/ toolbox? Can you explain more please. When I bring the toolbox then I can right click and go to additional control but my control of interest in not in the listbox there.

maryam
04-25-2007, 10:43 PM
Charlze which window do you mean? should I write this VBA code somewhere under some event?

Charlize
04-26-2007, 12:59 AM
Charlze which window do you mean? should I write this VBA code somewhere under some event?This is a commandline to be run from the commandline :rotlaugh: .

START - RUN ... then you type the command I gave you earlier and hit ENTER (NO VBA !!! This is a windows thing)

When you copy controls (dll, ocx, ...) you'll have to register them before you can use them (Oh, life would be simple). In a normal way they are registered when you install a program. If not, you have to do it manually (or you can write a bat-file ... good old dos).

Charlize

johnske
04-26-2007, 01:16 AM
Johnski do you mean to select it from the listbox in additional controls. It is not there. I could not find "register Custom Control"! hammer and spanner icon is view/ toolbox? Can you explain more please. When I bring the toolbox then I can right click and go to additional control but my control of interest in not in the listbox there.

OK, the full thing is: In the normal Excel window, go to View > Toolbars > Control Toolbox > More Controls (select it) - in the dropdown list that appears, "Register Custom Control" is the very last item (select it) - in the browser that appears, find your control, select it and click Open.

maryam
04-26-2007, 07:01 AM
Charlize, I did it and it showed me succed message.

maryam
04-26-2007, 07:06 AM
Charlize I did it and it showed me succced message, however I cannot have it yet. I tried what Johnske suggested. It brings DataGrid to the list of controls but when I want to put the control on a form it sais the control could not be created because it is not properly lisenced. how to solve this problem?

maryam
04-27-2007, 10:56 PM
any idea? probably I have to install microsoft office again

Aussiebear
04-28-2007, 01:57 AM
in 2007 its not called
MSDATGRD.OCX

maryam
04-28-2007, 02:38 AM
I am using 2003 and have 2003 lisenced office to install only.

johnske
04-29-2007, 02:33 PM
...it sais the control could not be created because it is not properly lisenced. how to solve this problem?You can't really solve this problem...you need to look at discontinuing use of this control and using another - preferably a standard office one if you intend to distribute and use on various machines. If you don't use a standard control, at least use one that can be registered with no known licensing issues. :)

FYI, I tried installing and registering MSDATGRD.OCX on my own machine (2000) and got the same message.

Carl A
04-29-2007, 03:43 PM
sais the control could not be created because it is not properly lisenced. how to solve this problem?

You Might try installing the VB6 Runtime library, however microsoft states
that to properly install an ActiveX control you should use the Package and Deployment Wizard or a third party installer. The setup.lst file from the PDW shows a MSSTDFMT.DLL and the MSDATGRD.OCX being registered on the system plus the VB6 Runtime files.
You might try registering the MSSTDFMT.DLL and the MSDATGRD.OCX plus installing the VB6 Runtime library. If you know someone that has VB6 in you organization just have them create a dummy install using the MSDATGRD.OCX ActiveX control. This setup file is 3meg zipped.

If you intend to distribute your workbook to other people in your organization I would take johnske advice and use something else. Sorry that this couln't be more straight forward and if I'm wrong I'm sure the people in the know will correct me.:biggrinro

http://support.microsoft.com/kb/290887

maryam
04-29-2007, 08:14 PM
MSDATGRD is not a standard control? what a replace control for it?

johnske
04-29-2007, 08:34 PM
MSDATGRD is not a standard control?It appears not, otherwise you wouldn't have to install and/or register it separately from office...


what a replace control for it?As it's not on my machine I have no idea what it is or does, so have no idea of a replacement - perhaps someone else knows...