Probably you can use DeleteLines method:
Application.VBE.ActiveVBProject.VBComponents("Module1").CodeModule.DeleteLines
But there us a macro security level settings that may prevent running this code for particular user. She/he should deliberately set the security level manually from the application.
>Dear Sir,
>
>I have some macros created in Excel Sheet .
>
>I am using VB6 to control the Excel sheet. After running the macros in excel sheet . I want to delete it . Please help how to delete the Excel Macros throught VB6
>
>Thanks
>
>Rahul
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only