ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using String as Code for new Module (https://www.excelbanter.com/excel-programming/436620-using-string-code-new-module.html)

TFriis

Using String as Code for new Module
 
I have a loooong txt string containg code as one long continous line.

IE.

str = "sub newFunction dim i as integer, test as integer test = 0 for
i = 1 to i=1000 test=test+i next i end sub"

Just much much longer.

My issue is that I use this string as code for a new module - how do I
auto-convert my stringed code to something VB can read? - My string is
so long, that it cuts it (when max contents of a line is reached), and
therefore it cant interpretate/read the content.

TFriis

Using String as Code for new Module
 
thanks for the reply - I'll look into it :)


All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com