Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Add a VBA Module from a String instead of from a file

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Add a VBA Module from a String instead of from a file

I don't think there will be any problem with that.
If there is then write the string to a file first.
Read this: http://www.cpearson.com/excel/vbe.aspx

RBS


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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Module not file when open the excel file Thomas Excel Discussion (Misc queries) 1 July 14th 07 02:48 PM
Use String from another module Silencer116 Excel Programming 1 June 16th 06 01:52 PM
Save File without VB Module DynamiteSkippy Excel Programming 5 February 14th 06 09:19 AM
Copy module from one file to another [email protected] Excel Programming 3 September 20th 05 03:13 PM
Excel VBA to search all macro code in Excel module for specific string criteria Roger1947 Excel Programming 0 May 19th 04 05:51 PM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"