Hi all,
I was hoping someone could show me how to compress the 3 'ifs' below into a better arguement. At the moment it is possible to get the message box appearing 3 times when i only want it to appear once if one of the conditions are met.
If TextBox10.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("q" & Rows.Count).End(xlUp) = TextBox9.Value
End If
If TextBox12.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("s" & Rows.Count).End(xlUp) = TextBox11.Value
End If
If TextBox14.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("u" & Rows.Count).End(xlUp) = TextBox13.Value
End If
Any hlep would be appreciated!
Thanks in advance,
Matt
I was hoping someone could show me how to compress the 3 'ifs' below into a better arguement. At the moment it is possible to get the message box appearing 3 times when i only want it to appear once if one of the conditions are met.
If TextBox10.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("q" & Rows.Count).End(xlUp) = TextBox9.Value
End If
If TextBox12.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("s" & Rows.Count).End(xlUp) = TextBox11.Value
End If
If TextBox14.Value = "0" Then
MsgBox "The first line of data will be in red as this no consumption figures can be realised from the first reading!"
ActiveSheet.Range("u" & Rows.Count).End(xlUp) = TextBox13.Value
End If
Any hlep would be appreciated!
Thanks in advance,
Matt