I am trying to get a msgbox to popup based on a value in the spreadsheet.
I am currently using the below but whenever I open up a second workbook, im getting a Microsoft Visual Basic Run-time error '9': Subscript out of range
Private Sub Worksheet_Calculate()
If Sheets("Fx").Range("F1").Value = "NEED DATA" Then
MsgBox "Enter Exchange Rates", vbOKOnly
End If
End Sub
background: I have a 7 tabbed workbook. one of the tabs holds exchange rates which filter into other sheets.
I have created a IF function in the sheet to check weather this weeks exchange rates have been added in.
the IF will either return "OK" or "NEED DATA". this is in cell "F1"
Anyone any clues how to get this towkr?
I am currently using the below but whenever I open up a second workbook, im getting a Microsoft Visual Basic Run-time error '9': Subscript out of range
Private Sub Worksheet_Calculate()
If Sheets("Fx").Range("F1").Value = "NEED DATA" Then
MsgBox "Enter Exchange Rates", vbOKOnly
End If
End Sub
background: I have a 7 tabbed workbook. one of the tabs holds exchange rates which filter into other sheets.
I have created a IF function in the sheet to check weather this weeks exchange rates have been added in.
the IF will either return "OK" or "NEED DATA". this is in cell "F1"
Anyone any clues how to get this towkr?