Avatar of phoffric
phoffric
 asked on

Macro comments for understanding VBA

Need help understanding vba in excel spreadsheet. Attached is a spreadsheet with an indent macro. I would like to learn enough vba so that I can try to modify it if need be.
 29130882d.xlsm
I would appreciate if the macros could be annotated with comments for the non-obvious lines. Here is what I find obvious:

Dim lngLastRow As Long
For lngRow = 1 To lngLastRow
Next
Exit For
End If
lngLoopEnd = lngLastRow
SpreadsheetsVBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Martin Liss

I'm doing that for you now and in the next version of the workbook you'll see a complete explanation.
ASKER CERTIFIED SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
phoffric

ASKER
I do  understand 24 bit RGB notation which I know in hex notation.
phoffric

ASKER
Thanks again Martin. I appreciate the comments!
Your help has saved me hundreds of hours of internet surfing.
fblack61
Martin Liss

The DARK_GRAY and LIGHT_GRAY constants are better because they are self-documenting.
Martin Liss

You’re welcome and I’m glad I was able to help.

If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
              Experts Exchange Most Valuable Expert (MVE) 2015, 2017
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2018
              Experts Exchange Top Expert VBA 2018