Is it possible to delete an existing macro in an excel file and save it as a new file without that macro. tried and failed on Web in finding the solution.
need vb code to do that.thanks in advance.
Is it possible to delete an existing macro in an excel file and save it as a new file without that macro. tried and failed on Web in finding the solution.
need vb code to do that.thanks in advance.
See if link helps
http://www.cpearson.com/excel/vbe.aspx
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks, VBA Noob.
I tried that before this posting, but it gave compile error"user-defined type not defined".
sub delmacro()
Dim VBProj As VBIDE.VBProject
Dim VBComp As VBIDE.VBComponent
Set VBProj = ActiveWorkbook.VBProject
Set VBComp = VBProj.VBComponents("mymacro")
VBProj.VBComponents.Remove VBComp
end sub
Please read forum rules below and then wrap your code as per rule 5
VBA Noob
sorry, i didn't get it. so there is no way to save a new excel file(from an existing file) without macros or by removing macros ?
If you don't understand how to wrap code see linkOriginally Posted by mixel
Wrap Code
as per rule 5
VBA Noob5). Never post any code without using the Code Tags. Posting of any code without code tags makes your code hard to read and often impossible to be copied for testing. For more information about code tags
no problem. wrapping didn't help either.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks