When i run this and input data it works wonderfully if its unhidden...I need to Hide the ProWatch Data Sheet and it needs to still work with that sheet hidden...
Thoughts or comments please.
Code:
Dim currentrow As Long
Private Sub cmdGetNext_Click()
Application.ScreenUpdating = False
Sheets("ProWatch Data").Select
Range("A2").Select
ActiveCell.End(xlDown).Select
lastrow = ActiveCell.Row
currentrow = currentrow + 1
If currentrow = lastrow + 1 Then
currentrow = lastrow
MsgBox "You have reached the Last Row"
End If
txtReader00.Text = Cells(currentrow, 1).Value
txtReader01.Text = Cells(currentrow, 2).Value
txtInput1.Text = Cells(currentrow, 3).Value
txtInput2.Text = Cells(currentrow, 4).Value
txtInput3.Text = Cells(currentrow, 5).Value
txtInput4.Text = Cells(currentrow, 6).Value
txtOutput1.Text = Cells(currentrow, 7).Value
txtOutput2.Text = Cells(currentrow, 8).Value
txtOutput3.Text = Cells(currentrow, 9).Value
txtOutput4.Text = Cells(currentrow, 10).Value
Application.ScreenUpdating = True
End Sub
Private Sub CmdPrevBefore_Click()
currentrow = currentrow - 1
If currentrow > 1 Then
txtReader00.Text = Cells(currentrow, 1).Value
txtReader01.Text = Cells(currentrow, 2).Value
txtInput1.Text = Cells(currentrow, 3).Value
txtInput2.Text = Cells(currentrow, 4).Value
txtInput3.Text = Cells(currentrow, 5).Value
txtInput4.Text = Cells(currentrow, 6).Value
txtOutput1.Text = Cells(currentrow, 7).Value
txtOutput2.Text = Cells(currentrow, 8).Value
txtOutput3.Text = Cells(currentrow, 9).Value
txtOutput4.Text = Cells(currentrow, 10).Value
ElseIf currentrow = 1 Then
MsgBox "This is your first Record"
currentrow = currentrow + 1
End If
End Sub
Private Sub cmdSend_Click()
Application.ScreenUpdating = False
Sheets("ProWatch Data").Select
Range("F4").Select
ActiveCell.End(xlDown).Select
lastrow = ActiveCell.Row
' MsgBox lastrow
Cells(lastrow + 1, 1).Value = txtReader00.Text
Cells(lastrow + 1, 2).Value = txtReader01.Text
Cells(lastrow + 1, 3).Value = txtInput1.Text
Cells(lastrow + 1, 4).Value = txtInput2.Text
Cells(lastrow + 1, 5).Value = txtInput3.Text
Cells(lastrow + 1, 6).Value = txtInput4.Text
Cells(lastrow + 1, 7).Value = txtOutput1.Text
Cells(lastrow + 1, 8).Value = txtOutput2.Text
Cells(lastrow + 1, 9).Value = txtOutput3.Text
Cells(lastrow + 1, 10).Value = txtOutput4.Text
Range("A2").Select
txtReader00.Text = ""
txtReader01.Text = ""
txtInput1.Text = ""
txtInput2.Text = ""
txtInput3.Text = ""
txtInput4.Text = ""
txtOutput1.Text = ""
txtOutput2.Text = ""
txtOutput3.Text = ""
txtOutput4.Text = ""
Application.ScreenUpdating = True
End Sub
Private Sub UserForm_initialize()
currentrow = 1
If currentrow = 1 Then
MsgBox "You are now in the header row. Click Next to see the first data"
txtReader00.Text = ""
txtReader01.Text = ""
txtInput1.Text = ""
txtInput2.Text = ""
txtInput3.Text = ""
txtInput4.Text = ""
txtOutput1.Text = ""
txtOutput2.Text = ""
txtOutput3.Text = ""
txtOutput4.Text = ""
End If
End Sub
Thoughts or comments please.