Message Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
replied to other thread :)

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
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.
 
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.
 
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
*
 

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

Back
Top