commenting a chunk of code in VBA
Amazing chart utilities from Jon Peltier
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: commenting a chunk of code in VBA

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Does anyone nows how to comment a chunk of code in vba (more then a line without using the single quote)?

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I do not believe this is possible. Which is sort of a shame really. You either use REM or ' and that's your lot.



  3. #3
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Well I'll be ****ed, this still doesn't answer your question but you can use underscore to continue comments:


    Rem ksjdhfkjsh _
    sdjfkjshd

    'sdkhfksjhkjsfh _
    dsfsdlkfsjh


  4. #4
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Same s like we do in long code lines:

    'This is a multiline _
    comment which has no single _
    quote for each line


    Regards

  5. #5
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Yeah, it just doesn't make sense to me in comments though. Surely the REM or ' should instruct VBE to ignore all characters after it, on the same line.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com