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/436619-re-using-string-code-new-module.html)

Don Guillett

Using String as Code for new Module
 

Use continuation characters _ which is a space and an underscore

xxxxxxxxxxx _
yyyyyyyy _
zzzzzz

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"TFriis" wrote in message
...
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.




All times are GMT +1. The time now is 11:31 AM.

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