Not if the revenue is spent on something worse than the externality.
Also not if the revenue creates a self perpetuating monster that will devour more revenue even when the externality is gone.
And while we're on the subject, doesn't it seem the least bit concerning that funding specific pork through taxes on diffuse externalities creates a pretty huge incentive to keep that externality going? Who came up with the idea to let the people responsible for eliminating the externality also benefit from the taxes you get from it?