Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

workbook does not conatin macros but ....

Status
Not open for further replies.

deebaglee

Technical User
May 16, 2003
301
GB
hi every time i try and open a excel spreadsheet i keep getting the "this workbook conatains macros.....
but i did not create any macros!
 
Open VB Editor (Alt+F11). Look under the heading of the workbook in question and right click on any modules you find. Select remove module and NO to export. THis should clean out any problems.
 
sorry not to good with vb what is a module?
 
In excel press Alt+F11
This will take you to the VBE

You should be able to see a window called "Projects"
Under your workbook name, you should see objects for each sheet in the workbook and a thisworkbook object
Under that, it should list any modules - do what carr suggests for each of the modules you can see in there

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
thank you for clearing that up Geoff, i have had a look and there are no modules listed!
 
Try double clicking on the sheet and workbook objects
there may be code in them

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
LOL! You can use this code to delete the code:

Deleting All VBA Code In A Project

The procedure below will delete all the VBA code in a project. You should use this procedure with care, as it will permanently delete the code. Standard modules, user forms, and class modules will be removed, and code within the ThisWorkbook module and the sheet modules will be deleted. You may want to export the VBA code, using the procedure above, before deleting the VBA code.

Sub DeleteAllVBA()

Dim VBComp As VBIDE.VBComponent
Dim VBComps As VBIDE.VBComponents

Set VBComps = ActiveWorkbook.VBProject.VBComponents

For Each VBComp In VBComps
Select Case VBComp.Type
Case vbext_ct_StdModule, vbext_ct_MSForm, _
vbext_ct_ClassModule
VBComps.Remove VBComp
Case Else
With VBComp.CodeModule
.DeleteLines 1, .CountOfLines
End With
End Select
Next VBComp

End Sub


COURTESY OF CHIP PEARSON'S SITE:

Anne Troy
 
hi scanned through but nothing
should i be looking at the props of the sheets and objects?
 
This warning can also be generated by Excel 4 macros.
 
thanks folks i will try this out when i get back to the office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top