Well you want to prompt for two pieces of input, so use two input boxes.
Dim msg1, msg2 As String
line 16 msg = InputBox("ENTER PROD_DATE", "FIND")
line17 msg1 = InputBox( "Enter Shift", ?)
So you catch the second prompt in msg1
Well you want to prompt for two pieces of input, so use two input boxes.
Dim msg1, msg2 As String
line 16 msg = InputBox("ENTER PROD_DATE", "FIND")
line17 msg1 = InputBox( "Enter Shift", ?)
So you catch the second prompt in msg1
Use & instead of + and the general code snippet is:
Dim strFileName As String
strFileName = File1.Path
If Right$(strFileName, 1) <> "\" Then strFileName = strFileName & "\"
strFileName = strFileName & File1.FileName
Main.Show
Main.Image.Picture = LoadPicture(strFileName)
Public Class Form1
Dim counter As Integer = 1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
test() 'this is calling the sub named test
End Sub
Private Sub test()
Dim myMessage As String
Dim Prompt As String = "Input Password"
Dim title As String = "Inputbox Test"
Dim defaultText As String = ""
Dim userpassw As String = "Me"
myMessage = InputBox(Prompt, title, defaultText)
If myMessage = "Me" Then
MessageBox.Show("Password Correct")
Else
MessageBox.Show("Wrong Password or Cancel pressed")
counter = counter + 1
If counter > 2 Then
MsgBox("Entry Failed, Good bye")
End
End If
test()
End If
End Sub
End Class
You realy should google for the topics you are working with. The above code will do what you are supposed to be doing, try to understand it. Don't forget to close the thread and give credit.
They don't have to be in the same position. Look at this example:
http://msdn.microsoft.com/de-de/library/bb460136(v=vs.90).aspx
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\bin\Debug\bookshop.mdb" shoulds be like this:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\bookshop.mdb"
This will probably work:
Dim strFile, strData As String
Dim ln As Integer
Dim Reader As New System.IO.StreamReader(strFile)
Do
strData = Reader.ReadLine()
ln = strData.Length
If Mid(strData, 1, 1) = "A" And Mid(strData, ln, ln) = "0" Then
strData = Mid(strData, 1, ln - 1) & " Replace with this"
RichTextBox1.Text = RichTextBox1.Text & vbNewLine & strData
End If
Loop Until strData Is Nothing
Dim bal As Integer() =( 1000,2,3,17,50) should probably be
bal As Integer() ={1000,2,3,17,50}
the third error occured because of above
http://msdn.microsoft.com/en-us/library/wak0wfyt.aspx#BKMK_ArrayElements
There are lots of examples on the net. Here are good starters:
http://www.w3schools.com/sql/sql_alter.asp
http://www.techonthenet.com/sql/tables/alter_table.php
Dim marks() As Integer ' declares an one dimensional array to hold integer
ReDim marks(2) ' inialises the array to hold 3 integers at indecies (0) (1) ans (2)
If one needs to hold more integers and doesn want to loose the ones that have been entered already then one uses
ReDim Preserve marks(10)' which now can hold 11 intgers 0 to 10 and preservesthe ones already enterd
http://www.tutorialspoint.com/vb.net/vb.net_arrays.htm
Even so it is a very simple method to print a form it takes some code to get it right.The reason is the DPI of your monitor and the scale of the paper you are using. Here is a link that will show you hoe to do it:
http://support.microsoft.com/kb/230502/en-us
This will also work:
Dim byDay As Integer = CInt(Trim(txtByday.Text))
but read the article on conversion
http://www.owenpellegrin.com/articles/vb-net/converting-strings-to-numbers/
Maybe use this:
byHour = CInt(Val(Trim(txtByhour.Text)))
byDay = CInt(Val(Trim(txtByday.Text)))