User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,202 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,250 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums

Dialog Box

Join Date: Apr 2008
Posts: 34
Reputation: techtix is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
techtix techtix is offline Offline
Light Poster

Re: Dialog Box

  #5  
Apr 5th, 2008
When calling a function, make sure you use parentheses. Also, you are not soliciting a vbYes from the user. Just a vbOK or vbCancel.

** It's a personal preference, but when I call a function that is overloaded as a method, I try to always still call it as a function.

Private Sub Command2_Click()
Dim iResponse As Integer

iResponse = MsgBox("Have a gala shopping", vbOKCancel + vbInformation + vbDefaultButton1, "welcome to the superMarket")

If iResponse = vbOK Then
     Call MsgBox("sonia")
End If

End Sub
Last edited by techtix : Apr 5th, 2008 at 11:47 pm.
Reply With Quote  
All times are GMT -4. The time now is 10:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC