FXB
New Member
The second error tells you what you need to do
Code:You have: frmCafeJean.Hide() You want: Me.Hide()
but then how do specify which form I want to show or hide?
The second error tells you what you need to do
Code:You have: frmCafeJean.Hide() You want: Me.Hide()
but then how do specify which form I want to show or hide?
but then how do specify which form I want to show or hide?
Me.Hide()
frmDejeuner.Hide()
Visual Basic 6 is bestWhat exactly are you looking for? I won't do your homework but I don't mind helping you with certain aspects of it.
In this case, it's a relatively simple project so I'd suggest planning out/designing the initial UI that will be presented then slowly building up the backing code and any other UI objects you need to make it work.
I'm not big on VB2008, the last version I used was 6.
Visual Basic 6 is best
The second error tells you what you need to doCode:You have: LblSaisieNom = txtSaisieNom.Text You want: LblSaisieNom.Text = txtSaisieNom.Text
Code:You have: frmCafeJean.Hide() You want: Me.Hide()
True.
And a small mistake in programming tree, cause many issues.
This isn't how to do it, but just an example I found online of how to search through a worksheet for a specific value. You should be able to modify it to work in your project.I cannot figure out what the code would be for the "Submit" button. I need it so when variable value is inputed (in this case serial number) it will open a specific workbook and match the inputed number with the worksheet name in that workbook. Would also like an error to pop up if part number is not found and allow user to retry. As well as close window after done search.
Sub Find_First()
Dim FindString As String
Dim Rng As Range
FindString = InputBox("Enter a Search value")
If Trim(FindString) <> "" Then
With Sheets("Sheet1").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End With
End If
End Sub
Worksheets("Sheet1").Cells(x, y) = value
I have never programmed (write code) in any way shape or form before. So this is all new to me......
This is exactly what you need:
http://www.amazon.com/Microsoft-Pro...9005/ref=sr_1_1?ie=UTF8&qid=1327164562&sr=8-1
All the things you learn from that book can also be applied for newer VB 2010.It can of course also be applied in older VB such as 2002 and 2003 and 2005,but in VB 2002 and probably 2003 it might require some extra code to be written in order for examples from that book to work.But don't use VB 2002 and 2003.They are old.Feel free to use VB 2010 for this book.
Cheers!
Private Sub cmdcancel_Click()
Unload frmcompletedsealinput
End Sub
Private Sub cmdsubmit_Click()
Dim iRow As Long
Dim ws As Worksheets
Dim wb As Workbook
Set wb = Workbooks("")
Set ws = Worksheets("Sheet1")
'Find Last Row in table
iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
'check for a Job Number
If Trim(Me.txtjobnumber.Value) = "" Then
Me.txtjobnumber.SetFocus
MsgBox "Please enter a job number"
End If
'check for a Serial Number
If Trim(Me.txtserialnumber.Value) = "" Then
Me.txtserialnumber.SetFocus
MsgBox "Please enter a Serial Number"
End If
'check for a Date
If Trim(Me.txtdate.Value) = "" Then
Me.txtdate.SetFocus
MsgBox "Please enter a Date"
End If
'check for a Seal Part Number
If Trim(Me.txtsealpartnumber.Value) = "" Then
Me.txtsealpartnumber.SetFocus
MsgBox "Please enter a Seal Part Number"
End If
'check for a Customer Name
If Trim(Me.txtcustomername.Value) = "" Then
Me.txtcustomername.SetFocus
MsgBox "Please enter a Customer Name"
End If
'check for a Location
If Trim(Me.txtlocation.Value) = "" Then
Me.txtlocation.SetFocus
MsgBox "Please enter a Location"
End If
'Copy data to the Completed seal table
wb.ws.Cells(iRow, 2).Value = Me.txtsealpartnumber.Value
wb.ws.Cells(iRow, 3).Value = Me.txtserialnumber.Value
wb.ws.Cells(iRow, 4).Value = Me.txtcustomername.Value
wb.ws.Cells(iRow, 6).Value = Me.txtjobnumber.Value
wb.ws.Cells(iRow, 7).Value = Me.txtdate.Value
wb.ws.Cells(iRow, 9).Value = Me.txtlocation.Value
'Reset data for another entry
Me.txtsealpartnumber.Value = ""
Me.txtserialnumber.Value = ""
Me.txtcustomername.Value = ""
Me.txtjobnumber.Value = ""
Me.txtdate.Value = ""
Me.txtlocation.Value = ""
End Sub