Message Box

S

Sonja

Hi Strive4peace :)

Thanks SO much for your help !

I tried pasting your code into the code builder - is the following correct ?

Private Sub MsgBox_Click()
Select Case MsgBox( _
"Additions cannot be changed, Are you sure you want to save ?" _
, vbYesNo _
, "Continue with Save?")
Case vbYes
'statements
Case vbNo
'statements
End Select

End Sub

It gives me an error "Run time error '438'
Object doesn't support this property or method

When I hit debug, the code builder comes up with the following text
highlighted:
Select Case MsgBox( _
"Additions cannot be changed, Are you sure you want to save ?" _
, vbYesNo _
, "Continue with Save?")


Thanks again for your help - it is really appreciated :)

Sonja.
 
S

strive4peace

replied to other thread :)

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
W

Wayne-I-M

Hi Sonja

The underscores _ _ _ are not in the code (they are for dispaly only).
This means that what ever is just before and just after the underscore are on
the same line. Delete the underscore.
 
D

Douglas J. Steele

Actually, the underscores were likely intended to be there: they indicate
continuation from one line to another. A common error is to forget the space
before the underscore.
 
S

strive4peace

Hi Wayne,

a slight correction in terminology...

"This means that what ever is just before and just after the underscore
are on the same line."

change
'underscore are on the same line'
to -->
'space underscore are part of the same statement'

(obviously, they are not on the same line ;) )

I use line continuations a lot -- to logically break long statements so
they are, hopefully, more understandable

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Top