Add a VBA Module from a String instead of from a file

  • Thread starter gimme_this_gimme_that
  • Start date
G

gimme_this_gimme_that

If I have

Dim v as String
v = "Sub test() " + chr(10) + "MsgBox 33333" + chr(10) + "End Sub"

Is there a way to add a new module and insert the Sub test from the
string variable v ?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top