ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Hi,
How can i change this existing working code so it isnt a fixed range.
I get easily confused each time with the xlup code for which it needs,sorry
How can i change this existing working code so it isnt a fixed range.
I get easily confused each time with the xlup code for which it needs,sorry
Rich (BB code):
Private Sub UserForm_Initialize()
Set ws = ActiveSheet
Me.TextBox1 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "HONDA MC KEY #1")
Me.TextBox2 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "HONDA MC KEY #2")
Me.TextBox3 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "HONDA MC KEY #3")
Me.TextBox4 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "HONDA MC KEY #4")
Me.TextBox5 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "REMOTE FOB 3B UK")
Me.TextBox6 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "YAMAHA YH35")
Me.TextBox7 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "BUNDLE")
Me.TextBox8 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "BLACK")
Me.TextBox9 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "GREY")
Me.TextBox10 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "RED")
Me.TextBox11 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "CLEAR")
Me.TextBox13 = Application.WorksheetFunction.CountIf(ws.Range("$A$8:$K$200"), "REMOTE FOB 3B USA")
Me.CommandButton1.SetFocus
End Sub