PC Review


Reply
Thread Tools Rate Thread

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

 
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      26th Feb 2008
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 With Quote
 
 
 
 
RB Smissaert
Guest
Posts: n/a
 
      26th Feb 2008
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


<(E-Mail Removed)> wrote in message
news:dd5269e5-fff9-4585-9146-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Using String as Code for new Module Don Guillett Microsoft Excel Programming 0 25th Nov 2009 02:30 PM
Module / Sub as string Richard Microsoft Excel Programming 9 11th Jun 2008 01:35 PM
Use String from another module Silencer116 Microsoft Excel Programming 1 16th Jun 2006 01:52 PM
Problem With String in Module =?Utf-8?B?U2hhbmU=?= Microsoft Access Reports 2 2nd Jun 2006 05:56 PM
search for string in module =?Utf-8?B?V2V6Lms=?= Microsoft Access VBA Modules 3 23rd Feb 2005 03:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:43 AM.