Good morning,

I ws wondering if anyone on these boards has had any experience working with Made2Manage (ERP software) and Excel. We need to write a simple Excel macro to export some information from M2M to something we are creating in Excel. The few examples that come with M2M are pretty vague. I have searched the web and the forums, but have come up with nothing. Sorry if I have posted this in the wrong location, but I assumed that since Excel was involved, this would be a relavent spot.

Thank you for your time.

Here is an example directly from M2M help:

Window state controls whether you access parent or child information. For example, in the Orders (SO) window, sales order items are child (or detail) records and other data is part of the parent (or header). Made2Manage code calls the window state cCurrentState, which is either PARENT or CHILD.
For example, in Visual Basic, you use the GetScreen() function to get the object reference. The following lines of code use GetScreen() to set SoScreen to the Orders (SO) window, and then set that window to PARENT state if it's not there already:

Set SoScreen = GetScreen("SO")

If SoScreen.cCurrentState <> "PARENT" Then
SoScreen.SetState ("PARENT")
End If

It's outside the scope of this book to explain Visual Basic functions in detail. See Visual Basic online Help for details about any function. You can use any OLE-compliant development environment to create your programs; you are not limited to Visual Basic.

Window mode controls how you interact with the window. The modes match the buttons in the Action and Find toolbars .

Show and describe those buttons.

Send messages in the form

screen.action

For example, this Visual Basic code segment uses GetScreen() to set SoScreen to the Orders (SO) window, and then send that window an Add message:

Set SoScreen = GetScreen("SO")

SoScreen.Add()

This code segment checks screen mode and screen state:

If SoScreen.cMode <> "VIEW" Then

Ireturn = MsgBox ("Cannot navigate while a user is modifying data.", vbInformation)
Else
If SoScreen.cCurrentState <> "PARENT" Then
SoScreen.SetState ("PARENT")
End If
SoScreen.Last
RefreshData Me
End If

Some operations are not valid in some windows under certain circumstances, but OLE Server does not enforce validity rules. For example, when you work in the Made2Manage user interface, the Add button is always disabled in the ABOUT window. But OLE Server does not prevent you from sending an Add message to the ABOUT window. Sending an invalid operation can have unpredictable results.