1

Is there a why this code be shortened down to 1 line, Code works but would like to consolidate it.

'If active sheet has the code name below then exit this sub

If ActiveSheet.CodeName = "VPL" Then Exit Sub
If ActiveSheet.CodeName = "VBA_BlankBidSheet" Then Exit Sub
If ActiveSheet.CodeName = "VBA_BlankOptionSheet" Then Exit Sub
If ActiveSheet.CodeName = "VBA_Dropdowns" Then Exit Sub
Community
  • 1
  • 1
luke
  • 482
  • 4
  • 12
  • 29
  • take a look here:http://stackoverflow.com/questions/1505206/imitating-the-in-operator – Asaf Oct 21 '16 at 20:01

1 Answers1

1

I dont really understand your question...

You mean like use Or?

If ActiveSheet.CodeName = "VPL" Or ActiveSheet.CodeName = "VBA_BlankBidSheet" Or ActiveSheet.CodeName = "VBA_BlankOptionSheet" Or ActiveSheet.CodeName = "VBA_Dropdowns" Then Exit Sub

Andrew Lee
  • 80
  • 8