HUGE Variable

Discussion in 'Code Snippets and Tutorials' started by Anonymous, Mar 24, 2007.

  1. Anonymous

    Anonymous Guest

    Ok, my variable is a HUGE HTML block. It also containes ' blah" & txt1.text & " balh...

    how can I make my program substuate the variables, then add it to a textbox? Like, can I do this?

    dim strhtml as string
    strhtml = <<<<<<<<<<< until >>>>>>>>>.

    <<<<<<<<<<<<"BIG HTML BLOCK"
    (200 lines down)>>>>>>>>>>>>>>>.

    thanks
     
  2. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Can you explain better? I don't get what you want to do...
     
  3. Anonymous

    Anonymous Guest

    in other words, I need a multiline variable. Like, 200 lines.
     
  4. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    You can do that using the vbCr or vbNewLine command!!! If you write
    Code (Text):
    1. strExample = "Hello!!!" & vbCr & "This is a test"
    2. MsgBox strExample
    The result will be a messageBox saying:

    Hello!!!
    This is a test
     
  5. Anonymous

    Anonymous Guest

    so, I have to MANUALLY go through adding that to 200 lines? see you next june :)
     
  6. NHStephen

    NHStephen Level IV

    Joined:
    Jan 2, 2007
    Messages:
    1,114
    Likes Received:
    9
    No u dont just push CTRL + F and then put in what ever ur looking for and it should do it for u or go to word and


    Push CTRL + H and type in what u want to replace and it will do it for u
     
  7. Anonymous

    Anonymous Guest

    i dont;t have to REPLACE anything, I have to add somthing to the end of each line.
     
  8. NHStephen

    NHStephen Level IV

    Joined:
    Jan 2, 2007
    Messages:
    1,114
    Likes Received:
    9
    o lol um have fun with that wont take that long 200 lines fast enough should take u less than 20mins
     
  9. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    You can just use VB. You can make a simple text editor, create 3 textboxes with multiline Enabled. Then paste the code in the first textbox and add the code to a button click:
    Code (Text):
    1. Text1.Text = Replace(text1.Text, Text2.Text, Text3.Text)
    Done!!!