Im havin noobie problems like making OK and Cancel buttons any help please lol?.. also how do u go about makin seperate dialog boxes so that when i click on New Entry it opens a "New Entry" Dialog?

Recommended Answers

All 2 Replies

If vbYes = MsgBox("press", vbDefaultButton1 + vbYesNo + vbMsgBoxSetForeground + vbQuestion, "Title") Then
End If

vbDefaultButton 'connects' the first button (here the Yes button) to the enter key.

vbYesNo means that there will be 2 buttons to click on.

vbMsgBoxSetForeground means that what ever happens the messagebox will be put in front of any other form or app.

vbQuestion shows an questionmark icon


You can make you own 'dialogs' by showing a (little) form. Place some commandbuttons on it and/or some little pictures as icons.

Show it with:
Form2.Show vbModal
so the user has to click on it before the app proceeds.

In the commandbuttons of the form take this code to hide the form:
Private Sub Command1_Click()
Form2.Hide
End If

Now your app continues on the next line of code after this line:
Form2.Show vbModal

That will be what you probably need to do but if you're trying to put those buttons on the application that isn't in a message box then just add a command button from the tool box and in the property window in the bottom left of the screen (when the button is selected) change the caption to whatever you want it to say.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.