![]() |
|
#1
|
|||
|
|||
![]()
Thanks for posting the code: it is very long and complex! I can only make a
few observations since, firstly, I don't have the time to do extensive debugging, secondly, I don't have any way to test the setup (I don't have or know much about Peachtree) and finally, the use of Dynamic Data Exchange (DDE) is something I am only slightly experienced with. But I can perhaps provide some info to help your IT staff work on this. The VBA code here is using DDE to access Peachtree. DDE is a way for applications to share data. Here is one example of where the code invokes DDE, from the GenerateInvoice function (there are similar instances in most of the "GenerateXxxx" functions): On Error GoTo ErrorHandler ' Enable error-handling routine. ' Channel = Application.DDEInitiate("PeachW", COMPANY) ' DDEPoke Channel, "Password", Range("PWord") Then the error handler gives the error message you are seeing: ErrorHandler: ' Error-handling routine. Sheets("Status").Visible = False Sheets("Payroll_Calc").Select MsgBox ("The Peachtree accounting program must be running in the background before running this function. Start Peachtree then try again.") Now, in DDE you first establish communication with the other application by setting up a channel - that is what the Channel = Application.DDEInitiate() line is trying to do. Then it uses DDEPoke statements to send information or instructions to the other app, or a DDERequest to get data from it. It is erroring out somewhere in that process - I suspect it is in the DDEInitiate statement. Don't know what may have changed in XP that would affect this, or if maybe it is something different in the machine setup that makes it not find Peachtree when it looks for it. For example, the DDEInitiate refers to Peachtree only as "PeachW" - no path, no extension - does the XL setup recognize this? Is Peachtree in the default file path? If that changed, perhaps that is why it can't find it. For more info, here is a link to the DDE section of the MSDN library http://msdn.microsoft.com/library/de...DEInitiate.asp Sorry I can't do more, hope this contributes at least something to help others find the solution! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macros & Passwords | paulrm906 | Excel | 0 | 03-04-2006 01:30 AM |
Self Help Books for Macros? | KRB | Excel | 0 | 11-22-2005 01:33 PM |