MsgBox Special Characters

R

Rob

Can someone please, please tell me where to find a complete list of how I can
utilize special characters within an Excel MsgBox?

Specifically the open and close Parentheses... ( )



Thanks Much!
 
R

Rob

Her's my code... so far. I haven't gone farther because it constantly errors
out exactly at the.... (to Auto-Save) portion of the MsgBox.


Sub UpdateData()

Dim srcWB As Workbook
Dim desWB As Workbook
Dim tbWS As String
Dim taWS As String

tDay = Format(Now(), "mm-dd-yyyy")

On Error Resume Next
Set srcWB = Workbooks("Summary.xls")
Set desWB = Workbooks("Charts " & tDay & ".xls")
taWS = "Sheet1"
tbWS = "Sheet2"
On Error GoTo 0

If desWB Is Nothing Then
Select Case MsgBox("Today's Charts Were Not Detected!" &vbCRLF& _
& "If The Old Charts are Open BUT not Saved for Today Then..." & vbCLRF &
vbCRLF _
& vbTab "Please Select the YES Button... (to Auto-Save)" & vbCRLF & vbCRLF
& "Otherwise, Please Select NO" _
" to Auto-Open AND Auto-Save.",vbCritical + vbYesNoCancel, "Begin Update
Prompt")


End Sub
 
G

Gary Keramidas

give this a try, it's untested but compiled. also, watch for wordwrap.

Sub UpdateData()

Dim srcWB As Workbook
Dim desWB As Workbook
Dim tbWS As String
Dim taWS As String

tDay = Format(Now(), "mm-dd-yyyy")

On Error Resume Next
Set srcWB = Workbooks("Summary.xls")
Set desWB = Workbooks("Charts " & tDay & ".xls")
taWS = "Sheet1"
tbWS = "Sheet2"
On Error GoTo 0

If desWB Is Nothing Then
Select Case MsgBox("Today's Charts Were Not Detected!" & vbCrLf & _
"If The Old Charts are Open BUT not Saved for Today Then..." & vbCLRF &
vbCrLf _
& vbTab & "Please Select the YES Button... (to Auto-Save)" & vbCrLf &
vbCrLf & _
"Otherwise, Please Select NO to Auto-Open AND Auto-Save.", vbYesNoCancel, _
"Begin Update Prompt")

Case vbYes

Case vbNo

Case vbCancel

End Select
End If
End Sub
 
G

Gary Keramidas

i somehow miised your button selection after the auto save text:

vbCritical + vbYesNoCancel
 
R

Rob

Thank You Very Much!!!


Gary Keramidas said:
give this a try, it's untested but compiled. also, watch for wordwrap.

Sub UpdateData()

Dim srcWB As Workbook
Dim desWB As Workbook
Dim tbWS As String
Dim taWS As String

tDay = Format(Now(), "mm-dd-yyyy")

On Error Resume Next
Set srcWB = Workbooks("Summary.xls")
Set desWB = Workbooks("Charts " & tDay & ".xls")
taWS = "Sheet1"
tbWS = "Sheet2"
On Error GoTo 0

If desWB Is Nothing Then
Select Case MsgBox("Today's Charts Were Not Detected!" & vbCrLf & _
"If The Old Charts are Open BUT not Saved for Today Then..." & vbCLRF &
vbCrLf _
& vbTab & "Please Select the YES Button... (to Auto-Save)" & vbCrLf &
vbCrLf & _
"Otherwise, Please Select NO to Auto-Open AND Auto-Save.", vbYesNoCancel, _
"Begin Update Prompt")

Case vbYes

Case vbNo

Case vbCancel

End Select
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top