Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use DDE in VBA code.
I have a ray-trace application which is supposed to support DDE. If I type something lik
=ZEMAX|ignored!"GetSurface,2" into a cell it returns a string from the ZEMAX application which contains information on surface 2. STANDARD,-9.070294785E-005,-3.969000000E+003,MIRROR,1.751943691E+003,-1.000000000E+000,0.000000000E+000,0.000000000E+000 ,0.000000000E+000,0.000000000E+000,0.000000000E+00 0,0.000000000E+000,0.000000000E+000,0.000000000E+0 00 It also changes the formula displayed in the editing window to something lik ='#19264'|'#23'!'GetSurface,2' (the values change every time, and the link doesn't work next time the application is started) This isn't very helpful, so I tried writing a VBA function to set the cell up. That doesn't work (apparently you can't change cell values from within a function) Is there a way to execute a given string as if it was typed into a cell and return the results to a variable in VBA I have also tried the DDE functions directly within a macro, but I couldn't get them to work. Any help much appreciated Chri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
copying vba code to a standard code module | Excel Discussion (Misc queries) | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |