2,383 Posted Topics
Re: Using Array : strmsg = "John Doe der" Dim a() As String a = Split(strmsg, " ") Debug.Print a(UBound(a)) | |
Re: Make sure you have one more row for sum of amount Try : Dim temp As Integer temp = 0 For i = 1 To MSFlexGrid1.Rows - 1 temp = temp + Val(MSFlexGrid1.TextMatrix(i, 4)) Next i 'set sum of amount to last row MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, 4) = temp [/CODE] | |
Re: > but now i want to select(click) any one row from listview and get all three(NOT TWO) textbox.text from datatable BRAND Use SQL Statement. Select BRANID, BRANDNAME, ID From BRAND | |
Re: First you must know what the meaning of the error warning. "Runtime error '381 'Invalid property array index". You said that vb pointing you in line 2 (`List2.Selected(i) = True`) when error is came up, it means that your selected index is not available on the list. | |
Re: >> I am doing a calculation and want to put the results of the calculation in lblMortgagePayment you want to put the result in lblMortgagePayment, but you put wrong assignment in your code. Mr Brownstone was give the answer. | |
Re: [Read this thread.](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454099/how-to-populate-combobox-from-database) | |
Re: show your effort friend.. | |
Re: handle it with keyDown Event. this following code is form keydown event, you can do same with other controls. [code=vb.net] Private Sub Search_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.Up Then 'PictureBox1.Top -= 10 MsgBox("Key Up Pressed") ElseIf e.KeyCode = Keys.Down Then 'PictureBox1.Top += … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.compatibility.vb6.support.twipsperpixelx.aspx#Y114"]Check this site[/URL] and [URL="http://www.vbmigration.com/resources/detmigratingfromvb6.aspx?Id=19"]this too[/URL] | |
Re: [QUOTE=debasisdas;574995]Modules are a way to declare objects at one place and access them globally.[/QUOTE] yes, absolutely like debasisdas. modules helps u to declared globally function, procedure, variable, etc. so you didn't have to declare them again in every form. | |
Re: This should working : Private Sub Command1_Click() For Each ctl In Me.Controls If TypeOf ctl Is CheckBox Then If ctl.Value = vbChecked Then MsgBox ctl.Name End If End If Next End Sub | |
Re: Save the binary of image on accesss. | |
Re: This an example about struct of employee combining with array Module1 Public Type Employee EmpNo As Integer EmpName As String EmpPhone As String End Type Public Sub SetEmployee(ByRef emp() As Employee, ByVal i As Integer) ReDim emp(i) End Sub Public Sub SetEmpData(ByRef emp() As Employee, ByVal i As Integer, ByVal … | |
Re: So what the problem here? Provides more information. Thanks | |
Re: Hai Haviansyah.. As andre said that your code is not consistent. Ex when you use text1 instead of Name. But we really appreciate your post and hope many posts from you. :) *NB : Pake bhs inggris ya bro,,forum internasional nih,,hehe,,semua comment n bhs harus inggris,,ntar pada komentar,,kdg ada admin … | |
Re: This should working : Private Sub Command1_Click() xSearch = Text1.Text For i = 0 To Grid.Rows - 1 If xSearch = Grid.TextMatrix(i, 1) Then Grid.Row = Grid.TextMatrix(i, 1) For j = 1 To Grid.Cols - 1 Grid.Col = j Grid.CellBackColor = vbCyan Next j End If Next i End Sub | |
Re: [Read this thread](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/432852/how-to-search-for-a-certain-record-in-a-mshflexgrid) | |
Re: > Is there any way to add the full row that was selected from DataGridView1 to the table "PersonneCopy"? Yes. Get the value from datagrid and Use INSERT statement to add the selected row to Personnecopy table. | |
Re: > I have tried some but it will not work as I will > > If I press the X button on titel bar then > I will it goes to cmdquit where I have to > choose vbyes or vbno. > The tests I haave done just quit the … | |
Re: > error says : Syntax error (comma) in query expression '(acntId, 5/17/2013 , 'Last , First, Middle')' **'Last , First, Middle'** You want to insert 3 fields but the value of txtSpouseName.Text make compiler confused and rise an error. compiler might thought that it should be **'Last' , 'First', 'Middle'**. | |
Re: Read this article : [How to Sort ListView Items ](http://msdn.microsoft.com/en-us/library/ms229643%28v=vs.90%29.aspx) | |
Re: Try : Dim MyRnd as New Random TextBox1.Text = MyRnd.Next(1, 8)) | |
Re: > I just wonder how to enabled the X in the right > upper corner of a form. What you mean about x mark in the right upper corner? Are you put a button or some other control there? > When I press the X then I will that it … | |
Re: Post your code here. How far you doing this. Show some effort. we Will trying to help you. [Read this thread about how to read txt file.](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454185/read-text-file-into-listview) | |
Re: Try this : Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress If CType(sender, ComboBox).FindString(CType(sender, ComboBox).Text, 1) = True Then 'if it doesnt exist then remove the last character/s that dont match and set the cursor position to the end CType(sender, ComboBox).Text = CType(sender, ComboBox).Text.Substring(0, CType(sender, ComboBox).Text.Length … | |
Re: If you bet with large amount data and security then mysql, mssql or oracle is the best choise. For user configuring is not difficult as you thinking. Install your program and database as packet. To make it easy for user then your program must facilitate it. Can create database in … | |
Re: It causing of txtAccount_Balance_TextChanged event. When you clear textbox **txtAccount_Balance** it makes that event work and rise an error. It happen because there are no numbers in the textbox after clear the textbox but empty string. | |
Re: You will get this error because using of Val() function. e.g : `Val(txtbox_tolagoldweight.Text * 96) `, you just multiply string with number. try this : Sub kaat() goldkaatinratti = (((Val(TextBox1.Text) * 96) + (Val(TextBox2.Text) * 8)) + (Val(TextBox3.Text) * 8)) / 96 End Sub | |
Re: Try : `playlist.Items.Add(TextBox1.Text & "\" & fileInFolder.Name)` | |
Re: You can post your project in zip with clicking Files in this editor. Feel free to post. We'll trying to help you. | |
Re: In your qurey use "N" before your field value e.g `"insert into [UrduTextTable] values(N'" + txtUrduString + "') ` | |
Re: Have you ever heard about BeginTrans,CommitTrans and RollbackTrans? You can do this with Rollback. [Search the google about it.](https://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&noj=1&biw=1366&bih=640&q=BeginTrans%2C+CommitTrans%2C+and+RollbackTrans+Methods+vb6+access+tutorial&oq=BeginTrans%2C+CommitTrans%2C+and+RollbackTrans+Methods+vb6+access+tutorial&gs_l=serp.12...626393.628543.0.629514.2.2.0.0.0.0.754.754.6-1.1.0...0.0...1c.1.14.serp.le82NTufnaU) See this [article](http://bytes.com/topic/access/answers/552069-access-sql-there-way-rollback-transaction), [this article](http://www.access-programmers.co.uk/forums/showthread.php?t=178488), [this](http://visualbasic.freetutes.com/learn-vb6-advanced/lesson9/p15.html) and [this](http://www.vbforums.com/showthread.php?408072-how-to-use-BeginTrans-CommitTrans-amp-RollBackTrans). | |
Re: How far you go with this? Post your code. | |
Re: Use Select Statement. e.g : `"Select Holder_name, Balance from Account where Account_Number = '" & Textbox1.Text & "'"` | |
Re: You mean that you want to open the form1 but it open form2? something like that? You can remove the current form and add it back. | |
Re: You can use this following code : Private Sub Form_Load() If Dir$("D:\dani.txt", vbNormal) = "" Then MsgBox "This is your first time" Else ' Do anything if text file exist End If End Sub | |
Re: It's hard to do it if you don't know the exact time when the file is saved. About this case, i think better to have form to manage backup files, so you can choose any backup files to be deleted. | |
Re: > I fixed it If you already fix it then please share with us the solution. Your answer will help another members who has same problem like you. Also make this thread as Solved. Thank you. | |
Re: [This is how to find the real roots using Newton’s method:](http://www.chem.mtu.edu/~fmorriso/cm3215/excelTutorial1_2010.pdf) Function realCubeRoot(a, b, c, d, n) ' ' computes the nth real root of the cubic equation ' ' a x^3 + b x^2 + c x + d = 0 ' ' ================================================= xold = 1 iter = … | |
Re: [Read this](http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/ca257f22-115e-43f2-a28d-c806c81061b7) or [this article](http://www.codeproject.com/Articles/204929/Getting-current-browser-URL-with-VB-NET) | |
| |
Re: > .CancelError = True In line 4, Set CancelError to False. .CancelError = False |
The End.