Hi!!
This one should be pretty easy. I need a message box to appear if both cells C1 and C2 are populated with "OK" as the only option
I also have one already done that's just an FYI if C1 isn't populated, but if I could edit that to pop up if either or both are blank, and an indication which one is blank, that would be a wonderful addition. That might be super complicated though
I also need these two to play nice together! This is what the whole thing looks like together now. It's obviously giving me an error.
Thanks in advance for any help or guidance!!
This one should be pretty easy. I need a message box to appear if both cells C1 and C2 are populated with "OK" as the only option
Code:
If Range("C1").Value = <> "" and Range.("C2")<> "" Then
mycheck = MsgBox("Cannot append text to both ends of file name. Please correct and re-run macro.")
Exit Sub
End If
End If
I also have one already done that's just an FYI if C1 isn't populated, but if I could edit that to pop up if either or both are blank, and an indication which one is blank, that would be a wonderful addition. That might be super complicated though
Code:
If Range("C1").Value = "" Then
mycheck = MsgBox("Quarter is blank. Continue?", vbYesNo)
If mycheck = vbNo Then
Exit Sub
End If
End If
I also need these two to play nice together! This is what the whole thing looks like together now. It's obviously giving me an error.
Code:
Sub CheckQtr()
Dim mycheck As VbMsgBoxResult
If Range("C1").Value = "" Then
mycheck = MsgBox("Quarter is blank. Continue?", vbYesNo)
If mycheck = vbNo Then
Exit Sub
End If
End If
If Range("C1").Value = <> "" and Range.("C2")<> "" Then
mycheck = MsgBox("Cannot append text to both ends of file name. Please correct and re-run.")
Exit Sub
End If
End If
Call Copyfilefromto
End Sub
Thanks in advance for any help or guidance!!