Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a sheet at set times
Hi,
I was hoping someone could help with this,I have very little experience with excel but not unfamiliar with programming (mostly PLC programming).So here's my dilemma: I am importing data from a dde server (directsoft32 data server) into cells which works fine,I can create a macro to move the data to another sheet,but I need to move to 3 different sheets depending on the time. (8:00,4:00,12:00), and reset the counters in the plc. I aquire the data with: c3=dsdata|weightcell1!'v2001' c4=dsdata|weightcell2!'v2004' c5=dsdata|weightcell3!'v2007' c6=dsdata|weightcell4!'v2010' c6=dsdata|Cam1!'v1001' (Pass Counter) c8=dsdata|Cam1!'v1002' (Fail Counter) c9=dsdata|Cam2!'v1003' (Pass Counter) c10=dsdata|Cam2!'v1004' (Fail Counter) c11=dsdata|Cam3!'v1005' (Pass Counter) c12=dsdata|Cam3!'v1006' (Fail Counter) c13=dsdata|Cam1!'v1007' (Pass Counter) c14=dsdata|Cam1!'v1008' (Fail Counter) The "V"s are memory locations in the plc that I'm referencing. And to reset I use a macro: Sub Button1_Click() Channel = DDEInitiate ("Dsdata","weightcells") DDEPoke Channel,"V2001", 0 DDEPoke Channel,"V2002", 0 DDEPoke Channel,"V2003", 0 DDEPoke Channel,"V2004", 0 DDETerminate (Channel) Channel = DDEInitiate ("Dsdata","Cameras") DDEPoke Channel,"V1001", 0 DDEPoke Channel,"V1002", 0 DDEPoke Channel,"V1003", 0 DDEPoke Channel,"V1004", 0 DDEPoke Channel,"V1005", 0 DDEPoke Channel,"V1006", 0 DDEPoke Channel,"V1007", 0 DDEPoke Channel,"V1008", 0 DDETerminate (Channel) End Sub Any help would be greatly appreciated Thanks in advance Blue Skies Scott |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a new sheet from specific data in existing sheet | Excel Discussion (Misc queries) | |||
Creating form on sheet 1 and having info move to sheet 2 | Excel Discussion (Misc queries) | |||
How do you copy a sheet times 50 | Excel Discussion (Misc queries) | |||
Creating a Macro to Record Lap Times | Excel Discussion (Misc queries) | |||
Creating a chart from two tables of Times | Excel Discussion (Misc queries) |