PDA

View Full Version : Is there anyway I can whitelist an excel sheet to send emails via VBA



Better_Days
05-18-2018, 05:44 AM
I have a sheet that sends periodic emails but still have to grant it access to send emails by click the Allow button in Outlook if I restart my PC. Is there anyway I can whitelist specific excel sheets as I don't want to allow any old VBA script to run just certain excel sheets.


thanks

SamT
05-18-2018, 11:25 AM
Const WhiteSheets As String = "Comma, Separate, List, of, Sheet, Names"

If Instr(WhiteSheets, Sheet.Name) > 0 Then 'That's a WhiteListed Sheet