+ Reply to Thread
Results 1 to 3 of 3

long text string

Hybrid View

  1. #1
    jhahes
    Guest

    long text string

    Could someone please help me with this..

    I am trying to write a simple telephone script....I would use word, but the script will eventually reference formulas...so i thought excel would work.....

    This is what I have....The problem I am having is that I am trying to go to the next line so I can see everything and it is giving errors....i am using the blank space and the _ to go to the next line and it won't work....Does VBA have word wrap?.....

    Dim introScript as string
    Dim clientFirstName as string
    Dim additionalCash as currency

    clientFirstName = frmStep3.txtFirstName.value
    additionCash = frmStep3.txtAdditionalCash.value

    introScript = "Hi " & clientFirstName & " this is Josh from ABC Co, how are you? Based on your information, you are requesting " & additionalCash & " is this correct?"


    ......The script is much longer....is there anyway to put this so it can be on multipe lines in the VBA editor...when i use the blank space and _ character is gives me errors....Also, does anyone know if there are any templates for telephone scripts?....

    ...thanks for any help

    Josh

  2. #2
    keepITcool
    Guest

    Re: long text string


    Why dont you store/edit/maintain the strings in Excel cells,
    and have your code read them from there?

    insert "placeholders" for your variables..


    For each rngRow in rngClientTable.Rows

    s= Range("introscript").Value
    s= replace (s,"%clientfirstname%", txtFirstName.Text)
    s= replace (s,"%additionalcash%", txtAdditionalCash.Text)

    instroscript=s

    Capisce?

    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    jhahes wrote in
    <news:<jhahes.2bf2zi_1153689609.3633@excelforum-nospam.com>

    >
    > Could someone please help me with this..
    >
    > I am trying to write a simple telephone script....I would use word,
    > but the script will eventually reference formulas...so i thought
    > excel would work.....
    >
    > This is what I have....The problem I am having is that I am trying to
    > go to the next line so I can see everything and it is giving
    > errors....i am using the blank space and the _ to go to the next line
    > and it won't work....Does VBA have word wrap?.....
    >
    > Dim introScript as string
    > Dim clientFirstName as string
    > Dim additionalCash as currency
    >
    > clientFirstName = frmStep3.txtFirstName.value
    > additionCash = frmStep3.txtAdditionalCash.value
    >
    > introScript = "Hi " & clientFirstName & " this is Josh from ABC Co,
    > how are you? Based on your information, you are requesting " &
    > additionalCash & " is this correct?"
    >
    >
    > .....The script is much longer....is there anyway to put this so it
    > can be on multipe lines in the VBA editor...when i use the blank space
    > and _ character is gives me errors....Also, does anyone know if there
    > are any templates for telephone scripts?....
    >
    > ..thanks for any help
    >
    > Josh


  3. #3
    Tom Ogilvy
    Guest

    Re: long text string

    introScript = "Hi " & clientFirstName & " this is Josh from ABC Co, " & _
    "how are you? " & vbNewLine & _
    "Based on your information, you are requesting " & _
    additionalCash & ". Is this correct?"

    demo'd from the immediate window:

    clientFirstName = "Jim Bob"
    additionalCash = "$1,000,000"
    introScript = "Hi " & clientFirstName & " this is Josh from ABC Co, " & _
    "how are you? " & vbNewLine & _
    "Based on your information, you are requesting " & _
    additionalCash & ". Is this correct?"
    ? introScript
    Hi Jim Bob this is Josh from ABC Co, how are you?
    Based on your information, you are requesting $1,000,000. Is this correct?


    --
    Regards,
    Tom Ogilvy

    "jhahes" <jhahes.2bf2zi_1153689609.3633@excelforum-nospam.com> wrote in
    message news:jhahes.2bf2zi_1153689609.3633@excelforum-nospam.com...
    >
    > Could someone please help me with this..
    >
    > I am trying to write a simple telephone script....I would use word, but
    > the script will eventually reference formulas...so i thought excel would
    > work.....
    >
    > This is what I have....The problem I am having is that I am trying to
    > go to the next line so I can see everything and it is giving
    > errors....i am using the blank space and the _ to go to the next line
    > and it won't work....Does VBA have word wrap?.....
    >
    > Dim introScript as string
    > Dim clientFirstName as string
    > Dim additionalCash as currency
    >
    > clientFirstName = frmStep3.txtFirstName.value
    > additionCash = frmStep3.txtAdditionalCash.value
    >
    > introScript = "Hi " & clientFirstName & " this is Josh from ABC Co,
    > how are you? Based on your information, you are requesting " &
    > additionalCash & " is this correct?"
    >
    >
    > .....The script is much longer....is there anyway to put this so it
    > can be on multipe lines in the VBA editor...when i use the blank space
    > and _ character is gives me errors....Also, does anyone know if there
    > are any templates for telephone scripts?....
    >
    > ..thanks for any help
    >
    > Josh
    >
    >
    > --
    > jhahes
    > ------------------------------------------------------------------------
    > jhahes's Profile:
    > http://www.excelforum.com/member.php...o&userid=23596
    > View this thread: http://www.excelforum.com/showthread...hreadid=564129
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1