Declaring string constant

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Declaring string constant

    I want to declare a somewhat larger string constant which doesn't fit on one
    line. I tried several ways without luck. Is it even possible to declare it
    on more than one line?

    Thanks,
    john


  • Allen Browne

    #2
    Re: Declaring string constant

    You can break the string and use the line continuation charcter, e.g.:
    Const gstrcString1 = "Line1 " & vbCrLf & _
    "Line 2" & vbCrLf & _
    "Line 3"

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "John" <jo@hn.comwro te in message
    news:f53kje$23t p$1@textnews.wa nadoo.nl...
    >I want to declare a somewhat larger string constant which doesn't fit on
    >one line. I tried several ways without luck. Is it even possible to declare
    >it on more than one line?

    Comment

    • John

      #3
      Re: Declaring string constant

      Great! Thanks.
      john

      "Allen Browne" <AllenBrowne@Se eSig.Invalidsch reef in bericht
      news:467561b0$0 $22404$5a62ac22 @per-qv1-newsreader-01.iinet.net.au ...
      You can break the string and use the line continuation charcter, e.g.:
      Const gstrcString1 = "Line1 " & vbCrLf & _
      "Line 2" & vbCrLf & _
      "Line 3"
      >
      --
      Allen Browne - Microsoft MVP. Perth, Western Australia
      Tips for Access users - http://allenbrowne.com/tips.html
      Reply to group, rather than allenbrowne at mvps dot org.
      >
      "John" <jo@hn.comwro te in message
      news:f53kje$23t p$1@textnews.wa nadoo.nl...
      >>I want to declare a somewhat larger string constant which doesn't fit on
      >>one line. I tried several ways without luck. Is it even possible to
      >>declare it on more than one line?
      >

      Comment

      Working...