ä¸è¬çãªSubããã·ã¼ã¸ã£ãFunctionããã·ã¼ã¸ã£ãæå®ããã¨ãã¯0ãæå®ãã¾ãã Sub Sample10() Dim Cnt As Long Cnt = ThisWorkbook.VBProject.VBComponents("Module1"). _ CodeModule.ProcBodyLine("Sample10", 0) MsgBox Cnt End Sub ProcCountLinesããããã£ã¯ãæå®ããããã·ã¼ã¸ã£ã®è¡æ°ãè¿ãã¾ãã æå®ããå¼æ°ã¯ProcBodyLineããããã£ã¨åãã§ãã ProcCountLinesããããã£ã¯ãæå®ããããã·ã¼ã¸ã£ã®å®£è¨è¡(Sub ââãFunctionÃÃãªã©)以åã«ãã空ç½è¡ãã³ã¡ã³ãè¡ãããããã·ã¼ã¸ã£ã®çµäºè¡(End SubãEnd Functionãªã©)ã¾ã§ã®è¡æ°ãè¿ãã¾ããæå®ããããã·ã¼ã¸ã£ãã³ã¼ãã¢ã¸ã¥ã¼ã«å
{{#tags}}- {{label}}
{{/tags}}