Hi All,
I've searched around a few threads and picked bits of code to end up with the code below on my Userform to transfer data. I'm sure it's very ugly but works at the moment. I need help with two things though. Firstly when the Userform opens I can't click on the worksheet behind it and say scrol down the sheet to see if it's all working properly without closing the Userform. The second is I would like a feature on the Combo box to Add a new name straight through the Combo Box that would then update the Source list as well. Is this possible? Any help appreciated....
Private Sub ADD_Click()
Dim LastRow As Object
Set LastRow = Sheets("Player Action").Range("A65536").End(xlUp)
With LastRow
.Offset(1, 0) = ComboBox1.Text
.Offset(1, 1) = DTPicker1.Value
.Offset(1, 2) = BUYIN.Value
.Offset(1, 3) = WINLOSS.Value
'clear the data
Me.ComboBox1.Value = ""
Me.BUYIN.Value = ""
Me.WINLOSS.Value = ""
Me.ComboBox1.SetFocus
Dim ws As Worksheet
Set ws = Worksheets("Player Action")
ws.Cells(5, 7).Value = Me.TextBox1.Value
ws.Cells(5, 8).Value = Me.TextBox2.Value
ws.Cells(5, 9).Value = Me.DTPicker1.Value
Label1.Caption = Sheet1.Range("g6").Value
Label2.Caption = Sheet1.Range("h6").Value
Label3.Caption = Sheet1.Range("g7").Value
Label4.Caption = Sheet1.Range("h7").Value
End With
End Sub
<input id="gwProxy" type="hidden"><!--Session data--><input *******="jsCall();" id="jsProxy" type="hidden">
I've searched around a few threads and picked bits of code to end up with the code below on my Userform to transfer data. I'm sure it's very ugly but works at the moment. I need help with two things though. Firstly when the Userform opens I can't click on the worksheet behind it and say scrol down the sheet to see if it's all working properly without closing the Userform. The second is I would like a feature on the Combo box to Add a new name straight through the Combo Box that would then update the Source list as well. Is this possible? Any help appreciated....
Private Sub ADD_Click()
Dim LastRow As Object
Set LastRow = Sheets("Player Action").Range("A65536").End(xlUp)
With LastRow
.Offset(1, 0) = ComboBox1.Text
.Offset(1, 1) = DTPicker1.Value
.Offset(1, 2) = BUYIN.Value
.Offset(1, 3) = WINLOSS.Value
'clear the data
Me.ComboBox1.Value = ""
Me.BUYIN.Value = ""
Me.WINLOSS.Value = ""
Me.ComboBox1.SetFocus
Dim ws As Worksheet
Set ws = Worksheets("Player Action")
ws.Cells(5, 7).Value = Me.TextBox1.Value
ws.Cells(5, 8).Value = Me.TextBox2.Value
ws.Cells(5, 9).Value = Me.DTPicker1.Value
Label1.Caption = Sheet1.Range("g6").Value
Label2.Caption = Sheet1.Range("h6").Value
Label3.Caption = Sheet1.Range("g7").Value
Label4.Caption = Sheet1.Range("h7").Value
End With
End Sub
<input id="gwProxy" type="hidden"><!--Session data--><input *******="jsCall();" id="jsProxy" type="hidden">