schwientekd
asked on
Delete Excel Macro Vbscript
I have a vbscript to import an excel macro but I realize that I need to first delete the macro before I import it. The import script is listed below. What line do I need to add to delete the macro?
Dim oXL, oBook, oSheet
' Create a new instance of Excel and make it visible.
Set oXL = CreateObject("Excel.Applic ation")
oXL.Visible = True
' Add a new workbook and set a reference to Sheet1.
Set oBook = oXL.Workbooks.Open(oxL.sta rtuppath & "\Personal.xlsb")
Set oSheet = oBook.Sheets(1)
'Import previously created BAS module file
oXL.VBE.ActiveVBProject.VB Components .Import "C:\Macros\import\Module1. bas"
Dim oXL, oBook, oSheet
' Create a new instance of Excel and make it visible.
Set oXL = CreateObject("Excel.Applic
oXL.Visible = True
' Add a new workbook and set a reference to Sheet1.
Set oBook = oXL.Workbooks.Open(oxL.sta
Set oSheet = oBook.Sheets(1)
'Import previously created BAS module file
oXL.VBE.ActiveVBProject.VB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.