I
IanC
I have a problem with the following code:
Private Sub CommandButton2_Click()
Msg = "In Service Settings select Bone Fluoro." & Chr(13) & _
"If value of Filter > NR > 1 on Dose 1 tab is 6, " & _
"set MTS=2.16 otherwise set MTS=2.15"
Style = vbOKOnly
Title = "Which MTS table?"
MsgBox (Msg, Style, Title)
End Sub
With the MsgBox line, if I only specify Msg, everything is OK. If I try to
specify any other parameter, I get a compile error stating that and equals
sign is expected.
I've tried MsgBox(Msg, , Title) as well, but with no change.
I've also tried MsgBox("Msg", , "Title") and MsgBox(Msg, vbOKOnly, Title). I
know this wouldn't show the message & title I need, but I wondered if there
was some problem with my actual message to cause this problem.
I could incorporate the title text within the message, but that defeats the
object of the function allowing a title to be specified.
Any ideas why this isn't working? As far as I can tell from VBA Help there
are no errors in my syntax, but as usual I could be wrong!
Private Sub CommandButton2_Click()
Msg = "In Service Settings select Bone Fluoro." & Chr(13) & _
"If value of Filter > NR > 1 on Dose 1 tab is 6, " & _
"set MTS=2.16 otherwise set MTS=2.15"
Style = vbOKOnly
Title = "Which MTS table?"
MsgBox (Msg, Style, Title)
End Sub
With the MsgBox line, if I only specify Msg, everything is OK. If I try to
specify any other parameter, I get a compile error stating that and equals
sign is expected.
I've tried MsgBox(Msg, , Title) as well, but with no change.
I've also tried MsgBox("Msg", , "Title") and MsgBox(Msg, vbOKOnly, Title). I
know this wouldn't show the message & title I need, but I wondered if there
was some problem with my actual message to cause this problem.
I could incorporate the title text within the message, but that defeats the
object of the function allowing a title to be specified.
Any ideas why this isn't working? As far as I can tell from VBA Help there
are no errors in my syntax, but as usual I could be wrong!