View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default 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