View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default "Continue?" Message Box

Hi Paul,

Am Sun, 17 Jul 2016 14:48:58 -0700 (PDT) schrieb Paul Doucette:

On that same sheet if Cell B7=Molder, then I would like cell D8 to be checked along with the previous B1, B2, B3, B4, B5, B7, B8, B9, and B10. And if it's value has not been changed from it's default "Width", then the message box would be triggered.


I don't know if I understood your problem clearly.
Try:

Sub Test()
Dim strVals As String
Dim varVals As Variant
Dim i As Long, j As Long

strVals = "Customer,Item,Diameter,Lenght,Species,Machine,Con tact,Item
#,INQ# OR OLD PO#"
varVals = Split(strVals, ",")

For i = LBound(varVals) To UBound(varVals)
j = i + IIf(i < 6, 1, 2)
If Cells(j, 2) = varVals(i) Then
MsgBox "Range B" & j & " is not changed", vbOKOnly
Exit Sub
End If
Next
If Range("B7") & Range("D8") = "MolderWidth" Then
MsgBox "D8 is not changed yet", vbOKOnly
Exit Sub
End If
'Your Code
End Sub


Regards
Claus B.
--
Windows10
Office 2016