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
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
I'm doing that for you now and in the next version of the workbook you'll see a complete explanation.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I do understand 24 bit RGB notation which I know in hex notation.
ASKER
Thanks again Martin. I appreciate the comments!
The DARK_GRAY and LIGHT_GRAY constants are better because they are self-documenting.
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
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