Hi Helpers
I have the following code
Which in essence when the combobox "CMBStk" changes the code will run, which appears to be fine.
However when I click Ok on the user form (where "CMBStk" is), I get the error "Unable to get the Text property of the Range class".
A bit of code that I guess would potentially cause the problem from the Ok button is:
I simply require that the line be deleted if in column 4 the word "Yes" appears.
The good news is that it still does what I require it to do.
Hope that makes sense
mar050703
I have the following code
Code:
Private Sub CMBStk_Change()
Sheets("Sheet1").Select
Range("A35").Select
ActiveCell.Value = CMBStk
TxtFrm.Text = Sheets("Sheet1").Range("B35").Text
TxtCost.Text = Sheets("Sheet1").Range("C35").Text
Sheets("Stock").Select
Range("A1").Select
Do
If ActiveCell.Value <> Sheets("Sheet1").Range("A35") Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = Sheets("Sheet1").Range("A35")
ActiveCell.Offset(0, 4) = "Yes"
Sheets("Sheet1").Select
Range("A2").Select
End Sub
Which in essence when the combobox "CMBStk" changes the code will run, which appears to be fine.
However when I click Ok on the user form (where "CMBStk" is), I get the error "Unable to get the Text property of the Range class".
A bit of code that I guess would potentially cause the problem from the Ok button is:
Code:
If ChkStk.Value = True Then
Sheets("Stock").Select
Range("E1").Select
Do
If ActiveCell.Value <> "Yes" Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = "Yes"
ActiveCell.Select
Selection.EntireRow.Delete
Else
GoTo continue
End If
continue:
Unload Me
I simply require that the line be deleted if in column 4 the word "Yes" appears.
The good news is that it still does what I require it to do.
Hope that makes sense
mar050703