Antes de continuar, um pequeno parênteses, deixe seus comentários para este post.
InsertProcedureCode Workbooks("WorkBookBernardes.xlsb"), "mdl_Functions_AutomaticInserted"Sub InsertProcedureCode (ByVal wb As Workbook, ByVal InsertToModuleName As String)Dim VBCM As CodeModuleDim InsertLineIndex As LongOn Error Resume NextSet VBCM = wb.VBProject.VBComponents(InsertToModuleName).CodeModuleIf Not VBCM Is Nothing ThenWith VBCMLet InsertLineIndex = .CountOfLines + 1' customize the next lines depending on the code you want to insert.InsertLines InsertLineIndex, "Sub NewSubName()" & Chr(13)Let InsertLineIndex = InsertLineIndex + 1.InsertLines InsertLineIndex, _" Msgbox ""Olá Mundo!"",vbInformation,"".: Primeira""" & Chr(13)Let InsertLineIndex = InsertLineIndex + 1.InsertLines InsertLineIndex, "End Sub" & Chr(13)' no need for more customizingEnd WithSet VBCM = NothingEnd IfOn Error GoTo 0End Sub
Nenhum comentário:
Postar um comentário