Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Standard length of a line of VBA code?

This may be a matter more of opinion, but does anybody know if there is
a generally accepted length to how long a single line of code should be
before breaking it to the next line with a " _ "? What do you all do?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Standard length of a line of VBA code?

No, It's up to you.
Most of us just break the line so that it remains visible within the
viewable window.
Sometimes, if I have a particularly long set of arguments to a function I
just let it go on one line; if I want to see all the arguments, I just scroll
over.

But overall, NO there is no standard.
Whatever seems comfortable.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Standard length of a line of VBA code?

I like to have each argument on separate lines, and the same with the call.
I also prefer to name the parameters in the call.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"FourBlades" wrote in message
...
No, It's up to you.
Most of us just break the line so that it remains visible within the
viewable window.
Sometimes, if I have a particularly long set of arguments to a function I
just let it go on one line; if I want to see all the arguments, I just

scroll
over.

But overall, NO there is no standard.
Whatever seems comfortable.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Standard length of a line of VBA code?

I like to keep it below 76 characters, that way I don't get it wrapping
around if I print in portrait mode.

I think the NGs does wrap-around at about 72 chars though which is a pain.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Abe" wrote in message
oups.com...
This may be a matter more of opinion, but does anybody know if there is
a generally accepted length to how long a single line of code should be
before breaking it to the next line with a " _ "? What do you all do?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Line with length depending on the value of the cell Subodh Excel Discussion (Misc queries) 3 August 16th 11 12:05 AM
Measure length of an AutoShape Line? John Excel Worksheet Functions 6 April 17th 06 09:30 PM
Measure length of an AutoShape Line? John[_118_] Excel Programming 6 April 17th 06 09:30 PM
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM
Maximum length of a line? alainB[_9_] Excel Programming 3 April 23rd 04 03:22 PM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"