Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

,vb Information And ,vbyesno??

Hi i was wondering if it was possible to have a message box that is with the vb,information icon AND have it say "Yes" or "No" as buttons?


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
: Vbyesno
I have forgoten how to make so with vbyesno if you click yes it does something What would be the code so if i click yes msgbox "hi" appears.

VbYesNo Help!
How do I control the program flow based on the user's selection of the vbYesNo?

portion of code...

MsgBox "File Currently Exists in DataBase!" & _
vbCrLf & "Do you want to overwrite file?", vbYesNo, "Alert!"
If vbYes = 6 Then
objUpload.CopyFile txtPath.Text, "\Sms001SharedwebInternetGraphic_Search" & cbCategory.Text, True
rs.Fields!Path = "\Sms001SharedwebInternetGraphic_Search" & cbCategory.Text & "" & strNew & ""
rs.Fields!FileName = strNew
rs.Fields!Cat = cbCategory.Text
rs.Fields!FileExtension = strNewExt
rs.Fields!Title = txtTitle.Text
Exit Sub
MsgBox "File NOT overwritten.", vbOKOnly
End If

My Own VbYesNo MsgBox
I want to format the MsgBox in my way. So I developed a form that show a message.

My problem is that I have a sub function that first show the form I made with the message that asks the user if he wants to contniue or stop.
But the sub function actually continue performing all the code before the user respond by clicking continue or stop in the message form.

How can I make the sub function wait until the user respond?

Multiple Vbyesno's

I have had a look through the Standards and Practices and had search through the forums but can't seem to find an answer as to how to do multiple vbyesno question boxes.

I can make them like this: -

' question 1
if vbyes then

yes answer here

If vbNo Then
'question 2
MsgBox "Are they first choice?", vbYesNo, "Question"
If vbYes Then
MsgBox "This is the answer"
End If
If vbNo Then
'another question and so on
MsgBox "Is player on loan?", vbYesNo, "Question"
But then once you click Ok for that answer it carries on through all the other multiple vbyesno's. Im a little lost with it.

VbYesNo With Icon
How can I get an icon in a msg box created like this:
cnfNewRec = MsgBox("Create New?", vbYesNo, "Confirm")

By "icon" I mean like the one you would get using something like this:
MsgBox "Message.", vbExclamation, "Title"

MsgBox VbYesNo
Private Sub Form_Load()
Debug.Print MsgBox("yes or no", vbYesNo)
End Sub

When the message box pops up, the "Yes" button automatically has focus. How can I make it so the "No" button has the focus when the message box appears?

VbYesNo Msgbox
Hey all,

I want to use a vbYesNo msgbox. When the user clicks yes i want the msgbox to close and a txtbox to clear the text and if they click no then to unload the form.

Please help.


please look at this piece of code:

Private Sub cmd_delete_Click()
Dim confirm As ______
Call AbleFields
confirm = MsgBox("Are you sure you want to delete this record ?", vbYesNo + vbExclamation + vbDefaultButton2,

If confirm = vbYes Then
MsgBox "Record deleted successfully.", vbInformation,
_ "Deleted"

End If

End Sub

what kind of datatype should i declare (line)
another thins is when i press the button delete, it won't delete the record, what 's wrong with my code?

Problems With VbYesNo
Hey guys in new in the Visual basic world, so i will ofcourse ask newbie questions.

To start with i want to make a fake loginbox, With a username, password and a exit button in the right corner.

So i made a exit button in the right corner, now i want it when clicked it to say

" Are you sure that you want to quit? "

Yes no

I've done that now. but when i press yes it should quit the program and not be staying in the program...

My code looks like this until now :

Private Sub Command1_Click()

MsgBox " Are you sure that you want to quit?", vbYesNo

End Sub


I have another problem when making the textbox for the username. Then i made a login button, and i want it when clicked to go to another page, with other utilities.

Please reply, Thanks.

VbYesNo Question
Hi all,

I have never used vbYesNo for a message box before and would like to please know why when I click either vbYes or vbNo that the registry isn't being updated?

Thanks in advance.

VB Code:
Private Sub cmdResumeLater_Click()    On Error GoTo cmdResumeLater_Err        'the registry is putting question 1 as 0, so make sure the    'right number is inserted    If intQuestionNumber = 0 Then        intQuestionNumber = 1    End If        'ask the end user if they want to save the last question,    'right and wrong answer count.  if they say yes, save the    'information.  if they say no, reset everything as if they    'were going to start off from question one the next time    'they bring up the application    MsgBox "You are about to save some settings." & vbNewLine & vbNewLine & _           "If you would like to start this application" & vbNewLine & _           "from question " & intQuestionNumber & " then please click Yes," & vbNewLine & _           "otherwise click No.", vbInformation + vbYesNo, "Do you want to save?"        If vbYes = True And vbNo = False Then            SaveSetting "SimSoft 070-271", "Settings", "Last Question", intQuestionNumber            SaveSetting "SimSoft 070-271", "Settings", "Right", lblRightAnswersAmount.Caption            SaveSetting "SimSoft 070-271", "Settings", "Wrong", lblWrongAnswersAmount.Caption            Exit Sub        End If                If vbNo = True And vbYes = False Then            SaveSetting "SimSoft 070-271", "Settings", "Last Question", 1            SaveSetting "SimSoft 070-271", "Settings", "Right", 0            SaveSetting "SimSoft 070-271", "Settings", "Wrong", 0        End If        Exit SubcmdResumeLater_Err:    WriteToErrorLog "SS004"End Sub

Messgbox VByesno

pls tell me how to use VByesno buttons on messge box?

VbYesNo Complications...
This procedure is part of an extensive project. In this procedure I am writing to the file C:OffDataFile.txt. After the file has been written, the user is prompted to access frmPersonalInfo or not. Im trying to use vbYesNo in the MsgBox but regardless if they click Yes or No it still takes them to frmPersonalInfo.

Am I using the If statement wrong?

VB Code:
Public Sub WriteToFile() Dim fs As New FileSystemObjectDim ts As TextStreamDim strDate$ Set ts = fs.CreateTextFile("C:OffDataFile.txt")strDate = cboMonth.Text & " " & cboDay.Text & ", " & cboYear.Text      ts.Write (txtRegNo & " | " & txtFirstName & " | " & txtLastName & " | " & cboClass.Text & " | " & strDate)     ts.Close           MsgBox "Official Information file has been created for student: " & vbNewLine & vbNewLine & _          txtFirstName & " " & txtLastName & " " & "(" & txtRegNo & ")", vbInformation, _          "File created successfully"          Call cmdResetAll_Click               MsgBox "A Personal Information Form is required for each student.  Would you like to access the form now?", _          vbYesNo, "Personal Information Form required"                         If vbYes Then               frmPersonalInfo.Show               frmOfficialInfo.Hide          Else               Exit Sub          End If End Sub

VbYesNo Question !!!

I am using some messageboxes in my project with VbYesNo.

On some PC's the Yes and No on the box is in another language.

I want it to be in english on all PC's. Is there away to change the buttons on a message box ?


VbYesNo Messagebox?
VB Code:
If Msgbox("Save changes?", vbYesNo) = vbYes Then    ' user clicked yesEnd If

VbYesNo Question
Hi Everyone,

I currently have a MsgBox set up to display a message. Inside of the MsgBox I am using the vbYesNo command buttons. My question is this, if the user hits the Yes button then I want a new form to open. If the user hits the No button then I want the message box to close. The code I am using right now displays the new form whether or not I click the yes or no command button button. How can I get this to work correctly? I would appreciate any help. Thanks. Here is the code.


MsgBox "Do you wish to display the help file?", vbYesNo, "Help Notice"

If vbYes Then
frmHelpFiles.Show vbModal
End If

Msgbox Vbyesno
I need an example of how one works, havn't used one before and need to have the user click the yes no

but not sure how an if statement would work into that,

msgbox "would youlike to continue", vbyesno
if yes then
end if

is this how it works?
doesn't seem to work when I do it that way.

Multiple VbYesNo
Hi there! Just a little ? about vbYesNo. I want this Yes/No dialog box to open multiple times or until yes is clicked. Example:

Is this part #1 -----> Yes No
If No is clicked
Is this part #2 ------> Yes No

The way I have it now is under vbNo (for part #1) I throw up another MsgBox "Is this part #2?" Case vbYes enters a part number and under and Case vbNo just sets the focus to the part number field.

But this doesnt seem to be working. Any ideas of what I am doing wrong? Would some code examples be helpful.



Alternate MsgBox With VbYesNo

I'll use the code below, and use the vbYesNo function.
But i like to use som other values, so not "Yes" and "No" as caption for the buttons. But something else like: "Compact" and "Volledig" .
How can i do something like that ?

dim antwoord As Integer

antwoord = msgbox("Print more than 1 page?", vbYesNo)

If antwoord = 6 Then
form1.printform ' all information
small.printform ' less information



Using A VbYesNo Msgbox With A Boolean
I am trying to set the value of a boolean based on user input (hopefully using a vbYesNo messagebox, as I remember seeing it done this way before.

With the code set up the way it is right now, the boolean is always set to true no matter whether the user hits yes or no on the messagebox. What am I doing wrong?

Dim bApply As Boolean
bApply = MsgBox("The old weights will be overwritten, are you sure you want to proceed?", vbYesNo)

If bApply Then
Call theLayerStack.Item(lLayerStackIndex).InsertNewWeights(theCurrentWeight )
End If

Need Help With Msgbox Vbyesno Code
Hi everyone.Got a bit of an issue with a bit of code and its driving me around the bend. Wondering
if someone could have a look and let me know what I might be doing wrong.

Write_SIF_File SIF_Full_Path is referring to some code I have that creates the file and
adds all the data. I suppose you could imagine this as creating a text file if it helps.

Hope someone has an idea. Thanks

Private Sub cmdWrite_Click()
Dim fso
If fso.filexists(Drive1.Drive & "winnt.sif") = False Then

Write_SIF_File SIF_Full_Path
End If

Dim Msg, Style, Title, Response 'dim the variables
Msg = "Overwrite existing file?"
Style = vbYesNo + vbCritical
Title = "Overwrite Existing?"
Response = MsgBox(Msg, Style, Title)

If fso.filexists("" & "winnt.sif") = True Then
If Response = vbYes Then ' User chose Yes.
Write_SIF_File SIF_Full_Path ' Writes the file
If Response = vbNo Then
Exit Sub

VbYesNo (app Unloading Regardless Of Button Pressed)
I am using a messagebox with vbYesNo options. If No is pressed, then to unload the app, if Yes is pressend then to load certain forms. Right now, regardless of which button is pressed, the app is unloading.

VB Code:
Private Sub MDIForm_Load()    '/ If gbSubClassMenu is False, the menu is not subclassed    gbSubClassMenu = True     If gbSubClassMenu Then SubClassMenuXP     With Me        .Left = GetSetting("Business Manager", "Settings", "L", 1000)        .Top = GetSetting("Business Manager", "Settings", "T", 1000)        .Width = GetSetting("Business Manager", "Settings", "W", 13560)        .Height = GetSetting("Business Manager", "Settings", "H", 8895)    End With        m_lngRegistryCheck = GetSetting("Business Manager", "Settings", "FirstLoad", 0)        If m_lngRegistryCheck = 0 Then        m_intMsgBoxAnswer = MsgBox("You have not setup your backend database." & vbNewLine & _                                   "Do you want to create your database now?", vbInformation + vbYesNo, "Database Creation.")        If vbNo Then            Unload Me            Exit Sub        Else            frmMain.Show            frmDatabaseSetup.Show        End If    Else        frmMain.Show    End IfEnd Sub

then, if i change the code to show

VB Code:
If vbYes Then            frmMain.Show            frmDatabaseSetup.Show        Else            Unload Me        End If


VB Code:
If vbYes Then            frmMain.Show            frmDatabaseSetup.Show            Exit Sub        Else            Unload Me        End If

the app loads and shows both forms regardless of which button is pressed. the forms should only show if Yes is pressed, and No to unload the app.

MsgBox VbYesNo Problem(R To The Izzolved)
How do I set up a vbNo If then statement for this:

VB Code:
If MsgBox("Again?", vbYesNo) = vbYes Then Call MessageBox_Trick

I want it to load the form if vbNo.

Dumb Simple VByesno Question..BUT STILL I NEED HELP
MsgBox "Are you sure you want to quit", vbYesNo
If vbYesNo Then
End If

it didnt work
whats the rite way to do it?

Feed Answer To VbYesNo MsgBox

I am writing a macro which opens a second workbook, runs a macro in this second workbook and then closes it.

The macro in the second workbook starts with a MsgBox command "This macro will do... (blah), do you wish to proceed?"

I am not able to change the macro in the second workbook for various reasons.

Is there a way of feeding a vbYes answer to the MsgBox? Or perhaps another way to stop it appearing.

Application.DisplayAlerts = False does not work, since the MsgBox is called by a running macro, rather than by doing something like closing Excel, etc.

Can anyone help? Thanks

CALENDAR 1 And VbYesNO Dialog Box With Data Report
Hi! I/m juz a beginner and I'm programming an automated Inventory system by Time...My problem is that how to create a code using calendar 1 that displays a VBYESNO dialog box saying "END OF THE MONTH VIEW SUMMARY OF TRANSACTIONS?" If the user clicks yes the data report with the summary of transaction will display and if no it will juz cancel.. pls help me! ur help is an honor! Tanx


Load Form To Display Information/more Records To Read/write New Information...
After the file has been read, what code would have to be done if the user wanted to edit another entry file from the mnu_file edit cmd?
is there anything else i'm missing here ?

<vb> Dim strLName As String, strFName As String, strAddress As String, intApartment As String, strCity As String, strProvince As String, strPostal As String, strMemo As String
Const conprompt As String = "Enter the Contact's Last Name"
Const contitle As String = "Contact's Last Name"
Dim strInput As String
strInput = InputBox(contitle, conprompt)
Dim strfilename As String
strfilename = App.Path & "contact.dat"
Open App.Path & "contact.dat" For Input As #1 'open sequential file
Do While Not EOF(1)
Input #1, strLName, strFName, strAddress, intApartment, strCity, strProvince, strPostal, strMemo 'read in from file
If strLName = strInput Then
gstrLName = strLName
gstrFName = strFName
gstrAddress = strAddress
gstrCity = strCity
gstrApartment = strProvince
gstrPostal = strPostal
gstrMemo = strMemo

End If


Close #1 'close the file </vb>


Directory Information / File Information
How can I get a list of files say into an array then check what file extension each one has?

Help With MsgBox &"vbYesNo&"
I need this code fixed...(Complete is the title)

MsgBox "Would you like to Quit?", vbYesNo, "Complete"
If vbYes Then
End If
End Sub

If MsgBox ("Would you like to Quit?", vbYesNo, "Complete") = vbYes Then
End If
End Sub

Please Help! I tried both of those and they didnt work...

PST Information
Does anyone know what extra information is stored in PST file? In particular I am looking for informations (perhaps something like entryID) that will differentiate one PST from another? Since outlook realize something is changed if we create a new PST and rename the old one. Is there anyway to basically copy the informations of the original PST so that I can create a clone of the PST file? Thank you.

I Am Not Getting Any Information?
What could be wrong with this (it is in VB 6.0)

Private Sub Form_Load()
Dim Excely As Excel.Application
Dim WB As Excel.Workbook
Dim WS As Excel.Worksheet

Set Excely = New Excel.Application

Set WB = Excely.Workbooks.Add
Set WS = WB.ActiveSheet

Excely.Workbooks.Open App.Path & " est.xls"

MsgBox WS.Range("A1").Value


Set WS = Nothing
Set WB = Nothing
Set Excely = Nothing

End Sub

Information Regarding ISO
Hello everyone!

I don't think this fits into any other sections of the site and I have used the KB and Search areas to try and find information, but to no avail.

I am looking for information regarding the ISO file format, I know so far that it complies to the ISO 9660 and I know about those standards. So I don't need links to more about that.

What I am after is information about the FILE format for an ISO, I realise its a byte for byte representation of a filesystem, however, I do not know how it is broken up or anything of the sort. For example, I would not know how to differentiate the volume descriptor information from a file, or several files.

I checked sourceforge to see if I could find an open-source engine to get me started, but I couldn't find anything there either. If anyone can provide me with useful information I would be grateful, I'll also be your slave!


Tag Information
Does anybody know how i can go about extracting the TAG information from a RealAudio or RealMedia file (*.ra and *.rm). I have found a PHP script that does the job perfectly, except... it's PHP and this is VB. However, i will provide a link to it because i think it may be useful in helping me as well as anybody else develop an answer. I will just say, i had a look at an RM file in Notepad, and found that each section seems to be started with a small square character. Not sure if that helps.

GetID3 site:
RM Tag Demo:


Looking For Information...
I'm trying to make a Wizard to build a form, do you know where to find some information about making wizard, i don't find the msdn library exhaustive.


CD Information
SORRY to keep asking so many questions, and I hope this is the last for a while , but is there a way to get "advanced" information about a CD, things like:

Number of tracks (actual tracks like audio), number of sessions, type of CD, preparer, distributor, burn date, etc.

...I'm guessing this would have to be done through the API, right?

thanks in advance!

Need Information
I am looking to give my program admin rights so that the computers on my network can't refuse to give my program information.

this is a work issue and am not gonning to use this information for criminal activites

I Need Information, Please
Hello to all.

I need to know that I should do so that a control ocx sent since a pagina web can agree to data in local. One must certify the control as in java and if is as well as I should do it?


Need Information
hi I need some information about How to convert PCX file to JPEG file forat using VB ?

Edit: Moved from Database

CPU Information
hi everybody,
If there is any idea for getting information regarding CPU. If yes, please give some idea to me.


How Would I Get This Information?
This is code off of a website...

**Html Code**
<font color=black size=2>Username</font>
**End Code** (Obviously)

how would i get the Username to be displayed in the label..

Need Information On VB6

Does anyone know where I can get some information on how to use VB6 with crystal reports 9.

All I really need to do at the moment is fire of reports already created in Crystal reports 9 by the means of a command button on a VB6 form.

Also, I would like to be able to print out report using the same method (i.e. user clicking a command button on a VB6 form).



Pop Up Sys Information
i am in need of poping up system information dialog box on a button click...

Any idea?? share pls

Information Please
Im just wondering what sort of information can be gained and added to a listbox

Im looking for:

cpu speed and name

hard drive space and how much is used up

windows serial number(say for when u format ur pc and want to reinstall windows)

all i can think of at the moment, feel free to post others that i havent thought of.

Get Information
in windows xp pro, when you hover your mouse on an mp3 file, it shows some information about the file, including the length. Is there any way to access that piece of information from VB 6, in order to get the length of the file ?

Thank You

Looking For Some Information...
Does anyone know where I can get a full list of descriptions on all Visual Basic code? Such as Dim X as _______, all the definitions that come into play there. Any help would be appreciated.


DLL Information
I am using the dll written by other guys. I donot have any information regarding the dll except that I have to use that dll to call some of the functions in dll in my code. Is it any way that I can look up the function signatures in the dll to use those functions in my VB code? I am using VB 6.

Any help, greatly appreciated.

with regards,

Dear Vb users,

Can someone give me a good site for more information about vb .net? (explanation OOP etc).

Nice regards,


WMI --&gt; Looking For Information
Does anyone know of a "good" place I can find information on how to use the WMI reference??


Vb .net Information
Dear vb users,

Can someone tell us what the interesting things are in vb .net.

Nice regards,


Currently Looking For Some Information
I am just starting out on vb and am having some questions regarding something.

I wanted to create a program that would be GUI and when the use clicks a predefind button it will pop up a box waiting for the user to input something once it has done that then it would execute the program along with the param's that the user entered earlier. the program it would run would be a console program. Anybody have any skeleton code I could use to do this as it would help me out. the program would not need database support or external objects. ANYTHING would be helpfull. even a link as to where I could find something on how to do it.

thnx alot.

Copyright 2005-08, All rights reserved