![]() |
How do you evaluate cell value in vba
I am trying to use a button to send a workbook on a condition of cell
F7 having the value of 15 or more. If the value is less than 15, a msgbox displays telling the user to populate all fields in order for them to send. If the value equals 15 or more, an e-mail window opens with the workbook attached. Currently, everytime i click the submit button, it gives me the msgbox and does nothing else regardless of what value is in F7. Here's the code I have written so far: =========================================== Private Sub Send_Click() If ( F7 < 15 ) Then MsgBox ("You must populate all required fields to send.") Else ActiveWorkbook.SendMail Recipients:=MailTo End If End Sub =========================================== Suggestions please? |
How do you evaluate cell value in vba
If Range("F7").Value < 15 Then
-- Jim "Umgal21" wrote in message ups.com... |I am trying to use a button to send a workbook on a condition of cell | F7 having the value of 15 or more. If the value is less than 15, a | msgbox displays telling the user to populate all fields in order for | them to send. If the value equals 15 or more, an e-mail window opens | with the workbook attached. Currently, everytime i click the submit | button, it gives me the msgbox and does nothing else regardless of what | value is in F7. | | Here's the code I have written so far: | =========================================== | Private Sub Send_Click() | | If ( F7 < 15 ) Then | MsgBox ("You must populate all required fields to send.") | Else | ActiveWorkbook.SendMail Recipients:=MailTo | End If | | | | End Sub | =========================================== | Suggestions please? | |
How do you evaluate cell value in vba
Awesome! Thank you so much for your help! =0)
|
All times are GMT +1. The time now is 06:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com