Hey all new here.
I am having an issue changing code to place textbox value to current active sheet rather than a specific sheet. I am working my way through to create an active form to generate data based on scanning an item into a single textbox.
TextBox1.Font.Size = 28
TextBox1.Value = ActiveSheet.Range("E1").Value + 1
If Me.ScanTB = "" Then
Me.ScanTB.SetFocus
Else
For i = 1 To 1
c = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row 'Having issue here.
Sheets("Sheet1").Cells(c + 1, 1).Value = ScanTB.Text
Next i
Me.ScanTB = ""
Cancel = True
End If
I am having an issue changing code to place textbox value to current active sheet rather than a specific sheet. I am working my way through to create an active form to generate data based on scanning an item into a single textbox.
TextBox1.Font.Size = 28
TextBox1.Value = ActiveSheet.Range("E1").Value + 1
If Me.ScanTB = "" Then
Me.ScanTB.SetFocus
Else
For i = 1 To 1
c = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row 'Having issue here.
Sheets("Sheet1").Cells(c + 1, 1).Value = ScanTB.Text
Next i
Me.ScanTB = ""
Cancel = True
End If