Skip to content


CPM was written and tested under Windows XP. It has been successfully installed and run under Windows 7. It has not been tested with Windows 8 or Windows 10.

More Common Problems.

Decimal Separator

One problem with CPM is that it does not do well when using a comma “,” as the decimal separator. If you have difficulty reading in sessions you may want to set your system decimal separator to a period “.”. This article tells how to change the default Windows decimal separator: Changing decimal separator from comma to dot

Run-Time Errors

Run-time error '-2147417848 (80010108)': Automation error. The object invoked has disconnected from its clients.

This message may occur when trying to Print (or Print Preview). The name of the object being printed has a special character in it that is causing the printer to disconnect.

Although Windows and CPM-Dairy can normally handle them, it's best to avoid using the characters %, #, @, &, * when naming ingredients or files.

Automation error.

This message usually means that Windows is confused about the location of a system file. Do the following:

  1. Click on the Start button, then click Run.
  2. In the space available type regsvr32 scrrun.dll.
  3. Click OK. You should see a message ending in the word “succeeded.”

Runtime error 13. Type Mismatch.

The message could mean that an older version of a file is being used instead of the newer version CPM-Dairy is expecting. Do the following:

  • Click on the Start button, then click Search.
  • Search your entire hard drive for the file scrrun.dll.
  • There will be one in your Windows System (or System32) folder, but if you have others, you must check the versions of each one. To check the version:
  • a) Right-click on the file name (on the right-hand side of the Search screen).
  • b) Click on Properties.
  • c) Click on the tab “Version.”
  • d) The version should be highlighted.
  • The version in CPM-Dairy is If you have older versions (a smaller number), then you can copy the file scrrun.dll from the System folder and paste it into the other folders where it must overlay the older versions.

Runtime error 429. ActiveX component cannot create object.

There are several files that could be causing this problem. For some reason, one or more of them was not registered with Windows during the install process. Here is how to manually register them:

  1. Click on the Start button, then click Run.
  2. Type (or paste) regsvr32 scrrun.dll.
  3. Click OK.
  4. You should get a message saying “DllRegisterServer in scrrun.dll succeeded.”
  5. If you do, then try running CPM-Dairy.

Note: If you still get the runtime error 429 message, then do the steps again but replace Step 2 with: Type (or paste) regsvr32 “c:\program files\common files\microsoft shared\dao\dao360.dll”

Runtime error 380. Invalid property value.

The message you are getting means that an older version of a file is being used instead of the newer version CPM-Dairy is expecting. Do the following:

  1. Click on the Start button, then click Search.
  2. Search your entire hard drive for the file VSFLEX7L.OCX.
  3. There will be one in your System32 or System folder, but if you have others, you must check the versions of each one. To check the version:
  4. a) Right-click on the file name (on the right-hand side of the Search screen).
  5. b) Click on Properties.
  6. c) Click on the tab “Version.”
  7. d) The version should be highlighted.
  8. The version in CPM-DairyV3 needs is If you have older versions (numbers smaller than 7 or 144), then you can copy the file vsflex7l.ocx from the System32 folder and paste it into the other folders where it must overlay the older versions.

Failed to load control ’VSFlexGrid’ from vsflex7l.ocx. Your version of vsflex7l.ocx may be outdated. Make sure you are using the version of the control that was provided with your application.

The message you are getting means that an older version of that file is registered with Windows, even though the older file may no longer be on the machine. Anyway, the solution is to register this newer version by doing the following:

  1. Click on the Start button, then click Run.
  2. Type (or paste) regsvr32 VSFLEX7L.OCX.
  3. Click OK.
  4. You should get a message saying “DllRegisterServer in vsflex7l.ocx succeeded.”
  5. If you do, then try running CPM-Dairy.

Note: You may get a similar message with the file VSPRINT7.OCX in place of vsflex7l.ocx. Do the same steps after substituting the file name.

Run-time error 3021. No current record.

This usually means one of the CPM-Dairy files has been corrupted.

First check to see if the program is still running in the background. The “3021” error hides the program but doesn't close it.

Click the Ctrl, Alt and Delete buttons at the same time. On the Windows Security screen click on the Task Manager button, then the Applications tab. If you see CPM-Dairy listed, then click on it to select it and then click on the End Task button.

After making sure the program is closed, insert the CPM-Dairy CD and re-open the program.

Input past end of file.

This usually means that a file (session, feedbank or mix) is empty or contains characters that CPM-Dairy is not expecting and does not know how to handle.

How do I . . . ?

How do I create an Ingredient Mix and a “Make Mix?”? How are they different?

“Ingredient Mix” (the Bowl icon) allows you to select ingredients from your ration (by clicking on them) and to have them appear as one ingredient in the amounts they have when “mixed.” The name of the Mix is what should be typed in the single space provided on the “Ingredient Mix” screen.

“Make Mix” (the Blender icon) allows you to create a mix that can be used in other sessions.

  1. Select the feeds in the Session screen to be included in the mix(es).
  2. Copy and Paste or Drag and Drop the selected feeds to the Make Mix grid.
  3. The total feed amount (100%) is allocated to the first mix automatically. Percents are distributed from left to right and may never exceed 100. For example, if you change 100% to 80% in the first mix, then the remaining 20% will be put in the second mix. If you change 20% to 5% in the second mix, then the remaining 15% will be put in the third mix.
  4. Click on the “By Amount” tab to see the actual amounts in each mix and a Total amount on the bottom line. You may change the amount in each cell, but the same rule applies as in item 3 above.
  5. Change the name of the mix by selecting the mix name and typing a unique, meaningful name.
  6. Delete ingredients from the grid at any time.
  7. Add ingredients to the grid at any time.
  8. Move the position of ingredients in the grid at any time.
  9. Click on the OK button to save the mix(es). Mixes with a total of 0% will not be saved.

If you create a Mix with the “Make Mix” or Blender icon, then that mix is a file just like a Feedbank or Session file. It should be saved using File, Save As Mix. If you want to open the Mix in a different CPM-Dairy session, then you can click File, Open Mix, and select the Mix file.

How do I copy ingredients? I tried to use the old “Control C” method, but when I went to paste the nutrients were not correct.

The “Control C” method is part of Windows and will work to copy text only if you select that text, i.e. highlight the text, not just the cell. However, if you try to use that method to copy ingredients, only the name will be copied - the nutrients will be default nutrients for a new feed.

To copy ingredients in CPM (and get all the nutrient values), click on an ingredient, then use the Edit, Copy… menu, or the Copy button, or right-click and choose Copy Ingredient. Then click in the cell where you want to paste, and use any of the previous methods to Paste.

You may also Drag and Drop to move ingredients. However, if you drag from a protected feedbank, a copy (not a move) is performed.

How do I set the font size in the display screen? When I open a session and have the evaluation screen showing, it takes up a small fraction of the available screen. The program is already set to full screen window mode.

You can change fonts, font size, colors, etc. by clicking Preferences on the Main Menu.

If you want to change only fonts or font size, click View on the Main Menu.

How do I get lines on the printed report like they appear on the display screen?

The printed report should show all the lines that are visible on the screen view. Check the report in Print Preview. If it looks good there, but doesn't print properly, then your printer driver needs to be updated.

If you check the web site of your printer manufacturer, you should be able to download and install an updated driver. You may also print from the Print Preview screen.

However that doesn't always solve the problem. It may also be related to the size of the font you are using. If the font is large, it can “overwrite” the vertical lines. Try experimenting with a smaller font.

Open the Preferences screen to change the font for printed documents. It can be different from the screen font.

How do I add a new feed ingredient to the Ration?

You can't add a new ingredient directly, but you must copy an ingredient from the Feed Dictionary screen and edit it. To minimize the number of edits, try to pick an ingredient similar to the one you want to add.

How do I print the parameters used for the environment, management etc?

Almost every screen in CPM-Dairy can be printed using Export or Print Form. Export has a button on the toolbar, but both choices are available in a submenu if you right-click on a non-heading part of the screen. For example, if you open the Environment screen and right-click on the Current Temperature value, the submenu will appear. Choose Print Form to send a copy of the Environment screen directly to your default printer, or choose Export to send the screen to an RTF, BMP, PDF, TXT or HTM file that can be opened in other applications and printed later.

How do I copy a ration's feeds into a feedbank?

Do the following:

  1. Open the CPM-Dairy program.
  2. Open the session that has the feeds you want in the feedbank.
  3. Click on File, then New, then Feedbank.
  4. Type a name for your feedbank in the space provided, then click OK.
  5. The screen will now show your new, empty feedbank on the left and the Dictionary screen on the right.
  6. You can drag individual ingredients from the ration (or any feed library) and drop them in the feedbank. If you want to select all of the ration, then right-click on one ingredient, then left-click on “Select All,” then drag and drop.
  7. When you are finished with the feedbank, you need to save it. Click on File, then Save As, then Feedbank, then the feedbank name. On the save screen you should locate the folder where you want to keep this feedbank file. It should be in a spot you can find again!
  8. The feedbank stays available (in the Dictionary screen) until you close the program or remove it from the program.
  9. When you want to bring the feedbank into the program, click on File, then Open, then Feedbank. Then you will have to find the folder where you saved the feedbank.

How do I send a session file that contains an ingredient mix to a client when I do not want him to know the formula of the mix?

When you save a session with an ingredient mix or a make mix, a screen will appear listing all the mixes currently open. The screen asks you to check those you want to save and uncheck those you do not. If you want your client to be able to open the mixes then you need to check them. If you uncheck them then the mix becomes an ordinary ingredient.

How do I know what nutrients in the feed dictionary correspond to the starch and sugar values seen on the CNCPS report of CPM-Dairy?

If you open the dictionary screen and click on the Carbohydrate tab, then click on a cell in the Cho– columns, there is an info message at the bottom of the screen that identifies each of the “new” carbohydrates. For example, ChoA2 is Sugar.

How do I get CPM-Dairy to do least cost formulation?

CPM-Dairy does least cost ration balancing through its “Optimize” feature. You can Optimize by opening a ration and clicking on the “Optimize” icon (a calculator) or by clicking on the Menu item “Action,” then “Optimize.” On the Optimize screen you check the nutrients, minvits, and ingredients you want included, along with their minimum and maximum values. Click the OK button to begin the optimization.


I wanted to optimize and an error message told me the minimum was greater than the maximum, yet the two numbers were equal! Why did I get this error message?

The values for minimum and maximum are rounded to the number of decimals you have chosen to view. So even though 2.015 might appear as a minimum and a maximum, the minimum might be closer to 2.015362 and the maximum might be closer to 2.014972. In this example, type 2.015 in each cell and the numbers will be equal internally and externally.

I printed the CNCPS Evaluation and it took two pages even though I checked the box to “fit the page.”

How much will fit on the page depends on the font type, font size and margins. When you set “Fit to Page,” the program reduces your selected print font by one point until the report fits on one page within your margins, OR until the font goes below 6 points. Most fonts become unreadable when they get smaller than 6. You might want to experiment with printing using different fonts since they do vary in how widely spaced the characters are. Another thing to watch out for is whether the font you have selected exists on your printer. If it doesn't, then the printer substitutes another font, and the substitute font may be wider than the one you wanted. This font substitution will also occur if you send a document to another user who does not have that font on his or her printer. So if you plan on sharing documents, pick a common font! Open the Preferences screen to change the font for printed documents. It can be different from the screen font.

You may also find it helpful to use the Print Preview rather than the Print button in CPM-Dairy. That way you can see exactly what the output will look like before printing.

When I try to print I keep receiving the message “please check an item in the screen column.”

This message will appear if you have checked to print a Batch Mix but have not also checked the view that you want (Macro Nutrients, Minerals and Vitamins, or No Nutrient Summary). It can also appear if you check an ingredient (under Screens) but have not checked which screen you want to see.

Basically the Printing Selection screen is divided into two columns and most reports need a check in each column.

Sometimes when I formulate an ingredient mix I find that the report sheets are different than when the individual ingredients of the mix are “unpacked.” I see this particularly with the bypass fat - the bypass fat gets lost in the reports.

When ingredients are mixed in CPM-Dairy, the resulting mix is an individual ingredient with the nutrient values that best reflect its original parts. For most nutrients that simply means the mix has the total amount, but there are some places where the program has to make decisions about the mix. For instance, is the mix a forage or a concentrate? In CPM-Dairy, it can't be part one and part another, so the program looks at the contents of the mix, and if it is more than 50% forage, then the mix becomes a forage (100%). The same happens with the Fat type. If the contents are more Type 1 than 2 or 3, the mix is assigned Fat type 1.

Because of this, mixing ingredients that are similar will give you a more accurate nutrient picture. It may mean you need to put different Fat types into separate mixes.

Categories: CPM


No Trackbacks


Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Form options