Thanks I see how that works but here is the code where I want to call the other Macro. I can call both my macros from another macro by themselves no problem. But for some reason it wont call the macro I have highlighted when I put the code in like this. Any thoughts???
Sub Test()
Dim requiredCells As Variant
Dim prompts As Variant
Dim i As Long
requiredCells = Array("a3", "d3", "h3", "k3")
prompts = Array("Date", "Account Manager", "Warehouse From", "Warehouse To")
For i = LBound(requiredCells) To UBound(requiredCells)
If Range(requiredCells(i)).Value = vbNullString Then
Range(requiredCells(i)).Value = userInput(prompts(i))
If Range(requiredCells(i)).Value = vbNullString Then Call Mail_workbook_Outlook_2
End If
Next i
End Sub
Function userInput(promptString As Variant) As String
Do
userInput = Application.InputBox("You must enter a " & promptString, Type:=2)
If userInput = "False" Then userInput = vbNullString: Exit Function
Loop Until userInput <> vbNullString
End Function
Bookmarks