VBA - Cut an instruction line in a macro

December 2016



Issue


I have a macro where I have a line that is too long (greater than 255 characters).
Is there any solution to cut it in several parts?

Solution


To cut an instruction line, leave a space before the underscore (_)
 a = Int((d - 1721061 - Int((d - 1721061) _ 
            / 1460.97) + Int((d - 1721061) / 36524.25) - _ 
                Int((d - 1721061) / 146097)) / 365) 

Related :

This document entitled « VBA - Cut an instruction line in a macro » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.