Thread: String to code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Factivator Factivator is offline
external usenet poster
 
Posts: 4
Default String to code

Hello,

Probably a stupid question, but I don't seem to be able to fix it myself.

I have build a line of code in VBA, based on some cell content (selection of
sheets in a workbook), and now I have, in a string-defined variable, the
appropriate code, which I can check with debug.print. The variable, named
txt1, contains the text

Sheets(Array("Data02", "Data03")).Move after:=Sheets("StartAkk")

which is actually what I want to do (the actual sheet names selected will
change at runtime according to some "flags" set in a worksheet).

But now I need to execute that line of code, ie., "activate" the content of
txt1.

How do I do that ?


Thank you very much in advance !


Morten Jansen