+ Reply to Thread
Results 1 to 5 of 5

Extra Quote Mark

  1. #1
    bw
    Guest

    Extra Quote Mark

    CODE
    fname = "ChkDigitsSent" & Format(Now(), "mm") & Format(Now(), "dd") &
    Format(Now(), "yy") & ".xls"
    MsgBox fname ' There is no quote mark displayed here
    ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) &
    Chr$(34) & fname, vbYesNo + vbQuestion, "Create Copy?") ' There IS a quote
    mark displayed here (see below)

    QUESTION
    I'd like to know where the quote mark is coming from as is generated by the
    code above.

    MESSAGE BOX
    Do you want to save a copy of the file as:
    "ChkDigitsSent013005.xls




  2. #2
    Dave Peterson
    Guest

    Re: Extra Quote Mark

    chr$(34) is that quote mark.

    If you don't want it, delete it.

    ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    & fname, vbYesNo + vbQuestion, "Create Copy?")

    If you want one at the other end, add one.

    ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    & Chr$(34) & fname & chr$(34), vbYesNo + vbQuestion, "Create Copy?")



    bw wrote:
    >
    > CODE
    > fname = "ChkDigitsSent" & Format(Now(), "mm") & Format(Now(), "dd") &
    > Format(Now(), "yy") & ".xls"
    > MsgBox fname ' There is no quote mark displayed here
    > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) &
    > Chr$(34) & fname, vbYesNo + vbQuestion, "Create Copy?") ' There IS a quote
    > mark displayed here (see below)
    >
    > QUESTION
    > I'd like to know where the quote mark is coming from as is generated by the
    > code above.
    >
    > MESSAGE BOX
    > Do you want to save a copy of the file as:
    > "ChkDigitsSent013005.xls


    --

    Dave Peterson

  3. #3
    John
    Guest

    Re: Extra Quote Mark

    Hi,

    Can you tell me what the difference is between Chr(10) and Chr$(10)? (The $
    part rather than the 10.)

    Thanks

    John
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > chr$(34) is that quote mark.
    >
    > If you don't want it, delete it.
    >
    > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > & fname, vbYesNo + vbQuestion, "Create Copy?")
    >
    > If you want one at the other end, add one.
    >
    > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > & Chr$(34) & fname & chr$(34), vbYesNo + vbQuestion, "Create
    > Copy?")
    >
    >
    >
    > bw wrote:
    >>
    >> CODE
    >> fname = "ChkDigitsSent" & Format(Now(), "mm") & Format(Now(), "dd") &
    >> Format(Now(), "yy") & ".xls"
    >> MsgBox fname ' There is no quote mark displayed here
    >> ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10)
    >> &
    >> Chr$(34) & fname, vbYesNo + vbQuestion, "Create Copy?") ' There IS a
    >> quote
    >> mark displayed here (see below)
    >>
    >> QUESTION
    >> I'd like to know where the quote mark is coming from as is generated by
    >> the
    >> code above.
    >>
    >> MESSAGE BOX
    >> Do you want to save a copy of the file as:
    >> "ChkDigitsSent013005.xls

    >
    > --
    >
    > Dave Peterson




  4. #4
    bw
    Guest

    Re: Extra Quote Mark

    Thanks Dave,

    I can't tell you how stupid I feel sometimes. Chr$(34) was suppose to be
    Chr$(13), but I just couldn't see the mistake I had made.

    I appreciate your help.
    Bernie


    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > chr$(34) is that quote mark.
    >
    > If you don't want it, delete it.
    >
    > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > & fname, vbYesNo + vbQuestion, "Create Copy?")
    >
    > If you want one at the other end, add one.
    >
    > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > & Chr$(34) & fname & chr$(34), vbYesNo + vbQuestion, "Create

    Copy?")
    >
    >
    >
    > bw wrote:
    > >
    > > CODE
    > > fname = "ChkDigitsSent" & Format(Now(), "mm") & Format(Now(), "dd")

    &
    > > Format(Now(), "yy") & ".xls"
    > > MsgBox fname ' There is no quote mark displayed here
    > > ans = MsgBox("Do you want to save a copy of the file as: " &

    Chr$(10) &
    > > Chr$(34) & fname, vbYesNo + vbQuestion, "Create Copy?") ' There IS a

    quote
    > > mark displayed here (see below)
    > >
    > > QUESTION
    > > I'd like to know where the quote mark is coming from as is generated by

    the
    > > code above.
    > >
    > > MESSAGE BOX
    > > Do you want to save a copy of the file as:
    > > "ChkDigitsSent013005.xls

    >
    > --
    >
    > Dave Peterson




  5. #5
    Tom Ogilvy
    Guest

    Re: Extra Quote Mark

    In current versions of excel, there is no difference.

    --
    Regards,
    Tom Ogilvy

    "John" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > Can you tell me what the difference is between Chr(10) and Chr$(10)? (The

    $
    > part rather than the 10.)
    >
    > Thanks
    >
    > John
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > chr$(34) is that quote mark.
    > >
    > > If you don't want it, delete it.
    > >
    > > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > > & fname, vbYesNo + vbQuestion, "Create Copy?")
    > >
    > > If you want one at the other end, add one.
    > >
    > > ans = MsgBox("Do you want to save a copy of the file as: " & Chr$(10) _
    > > & Chr$(34) & fname & chr$(34), vbYesNo + vbQuestion, "Create
    > > Copy?")
    > >
    > >
    > >
    > > bw wrote:
    > >>
    > >> CODE
    > >> fname = "ChkDigitsSent" & Format(Now(), "mm") & Format(Now(), "dd")

    &
    > >> Format(Now(), "yy") & ".xls"
    > >> MsgBox fname ' There is no quote mark displayed here
    > >> ans = MsgBox("Do you want to save a copy of the file as: " &

    Chr$(10)
    > >> &
    > >> Chr$(34) & fname, vbYesNo + vbQuestion, "Create Copy?") ' There IS a
    > >> quote
    > >> mark displayed here (see below)
    > >>
    > >> QUESTION
    > >> I'd like to know where the quote mark is coming from as is generated by
    > >> the
    > >> code above.
    > >>
    > >> MESSAGE BOX
    > >> Do you want to save a copy of the file as:
    > >> "ChkDigitsSent013005.xls

    > >
    > > --
    > >
    > > Dave Peterson

    >
    >




+ 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