View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
sali sali is offline
external usenet poster
 
Posts: 53
Default Execute a variable as an insertion into a VBA code line

"Martin Brown" je napisao u poruci
interesnoj ...
wrote:
2003 & 2007


It is ugly but you could do it as self modifying code by accessing the
project model. ISTR XL2007 will be tetchy about doing this and additional
security settings need to be changed to make it work.


why don't take 'vbscipt' as host, and from script access excel object?
vbscript has 'execute' statement and 'eval' function, where parameter to
them may be any composed string variable, so you are free to create them at
run-time