Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel and DDE

Status
Not open for further replies.

comcon

Technical User
Dec 14, 2001
7
US
Our new press is linked to a computer using DDE, so we have
an Excel spreadsheet that is continuously updated with data
from the press. I am wanting to save the data for logging purposes.

I thought my VB macro was working well as my log file is
updated every 10 seconds. However, that was when the press
was down. After it started running I saw that the DDE info
was not getting updated when my VB macro was running.

I am using a Timer to save the data, but somehow that is
inhibiting the DDE data from being updated.

Does anyone know how I can get around this?

Thanks.


 
I probably can't help, comcon. However, those who can will probably be able to help much better if you post your code. dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
The following is a piece of my code.
When this is operating, the DDE events in the
"PressActivity.xls" spreadsheet are stopped.
How can I do the following, yet keep the DDE
events still processing?

Thank you very much.



Do While Timer < 75000
If Int(Timer) / 10 = Int(Int(Timer / 10)) Then

Job = Cells(4, Col)
Pressman = Cells(5, Col)
Time_Started = Cells(6, Col)
Status = Cells(7, Col)
Req_Copies = Cells(8, Col)
Good_Copies = Cells(9, Col)
Waste_Copies = Cells(10, Col)
Total_Copies = Cells(11, Col)
Press_Speed = Cells(12, Col)
Percent_Completion = Cells(13, Col)
Average_Speed = Cells(15, Col)
Top_Speed = Cells(16, Col)
Comments = Cells(17, Col)

Workbooks(&quot;Press Log Save&quot;).Activate
New_Row = New_Row + 1
Cells(New_Row, 1) = Job
Cells(New_Row, 2) = Pressman
Cells(New_Row, 3) = Time_Started
Cells(New_Row, 4) = Status
Cells(New_Row, 5) = Req_Copies
Cells(New_Row, 6) = Good_Copies
Cells(New_Row, 7) = Waste_Copies
Cells(New_Row, 8) = Total_Copies
Cells(New_Row, 9) = Press_Speed
Cells(New_Row, 10) = Percent_Completion
Cells(New_Row, 11) = Average_Speed
Cells(New_Row, 12) = Top_Speed
Cells(New_Row, 13) = Comments
Cells(New_Row, 14) = Date
Cells(New_Row, 15) = Int(Timer)
Cells(New_Row, 16) = Time

ActiveWorkbook.Save
Workbooks(&quot;Press Activity&quot;).Activate
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 3
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime


End If
Loop
 
I need your help with this I am trying to do the same thing...
 
We had enough trouble with the DDE that we purchased some software from Wonderware to help with the interface. It is working well for us. It gives us a daily minute by minute log of several data points on the press, which we import into Excel and analyze several ways. We then print logs and charts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top