VBA Code That Counts Code – Yes, Really!
Counting Code So You Don’t Have To
Sub CodeCounter()
Dim CodeLineCount As Double
Set CodeLineCount_Var = ThisWorkbook.VBProject
For Each CodeLineCount_Var In CodeLineCount_Var.VBComponents
CodeLineCount = CodeLineCount + CodeLineCount_Var.CodeModule.CountOfLines
Next
CodeLineCount_Total = CodeLineCount
Set CodeLineCount_Var = Nothing
MsgBox ("Lines of code: " & CodeLineCount_Total & vbNewLine & vbNewLine & "Subs: " & Application.VBE.ActiveVBProject.VBComponents.Count)
End Sub
📊 Want to know how big your codebase really is?
In this video, I’ll show you how to write a simple tool that automatically counts the number of lines of code (LOC) and the number of procedures or functions in your files. Whether you're tracking project size, doing code analysis, or just curious—this script gives you quick, useful insights into your code.
✅ What you'll learn:
How to count lines of code with and without comments
How to identify and count functions/procedures
How to apply the script to different file types and languages
How to use the results to better understand your codebase
🛠️ Great for beginners and experienced developers alike.
📁 Works with most programming languages (with minor tweaks).
💬 Drop your questions or improvements in the comments!
👉 Don’t forget to like, subscribe, and hit the bell for more dev tools and coding tips!
#CodeMetrics #ProgrammingTools #LineCounter #FunctionCounter #CodeAnalysis #DeveloperTips
Видео VBA Code That Counts Code – Yes, Really! канала VBAMacrosAndMore
Sub CodeCounter()
Dim CodeLineCount As Double
Set CodeLineCount_Var = ThisWorkbook.VBProject
For Each CodeLineCount_Var In CodeLineCount_Var.VBComponents
CodeLineCount = CodeLineCount + CodeLineCount_Var.CodeModule.CountOfLines
Next
CodeLineCount_Total = CodeLineCount
Set CodeLineCount_Var = Nothing
MsgBox ("Lines of code: " & CodeLineCount_Total & vbNewLine & vbNewLine & "Subs: " & Application.VBE.ActiveVBProject.VBComponents.Count)
End Sub
📊 Want to know how big your codebase really is?
In this video, I’ll show you how to write a simple tool that automatically counts the number of lines of code (LOC) and the number of procedures or functions in your files. Whether you're tracking project size, doing code analysis, or just curious—this script gives you quick, useful insights into your code.
✅ What you'll learn:
How to count lines of code with and without comments
How to identify and count functions/procedures
How to apply the script to different file types and languages
How to use the results to better understand your codebase
🛠️ Great for beginners and experienced developers alike.
📁 Works with most programming languages (with minor tweaks).
💬 Drop your questions or improvements in the comments!
👉 Don’t forget to like, subscribe, and hit the bell for more dev tools and coding tips!
#CodeMetrics #ProgrammingTools #LineCounter #FunctionCounter #CodeAnalysis #DeveloperTips
Видео VBA Code That Counts Code – Yes, Really! канала VBAMacrosAndMore
VBA code counter count lines of code VBA VBA line counter VBA function counter count procedures in VBA VBA code analysis VBA code metrics analyze VBA code VBA development tools VBA automation Excel VBA tools VBA script to count lines code size in VBA VBA macro analysis count macros VBA VBA LOC counter VBA custom tools Visual Basic for Applications VBA performance tips VBA productivity tool VBA code management VBA project analysis
Комментарии отсутствуют
Информация о видео
1 июня 2025 г. 7:51:10
00:00:29
Другие видео канала