![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Frankfort, KY
Posts: 127
|
You know the warning message regarding macros when you open a file with macros? Why am I getting it when I open a file with no macros attached? Is there a hidden one or something?
|
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
You've gone through each module (i.e., 'Thisworkbook', Sheet modules, userform, etc...)? Fire up the Visual Basic editor and use the 'project explorer.'
Run Chip Pearson's program below and I suspect the prompt will go away: 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
http://www.cpearson.com/excel/vbe.htm _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-05-02 08:37 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
Go into Visual Basic Editor and check the following:
1). No macros in any of Modules/Sheets/Workbook 2). If you have any Modules there (even if they're empty) remove them. Rgds AJ P.S. Becoming a bit of a FAQ this one! |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Location: Frankfort, KY
Posts: 127
|
you're over my head Nate-O. All I know is when I try to open a specific file, I get the message and there are no macros attached to that file.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Location: Frankfort, KY
Posts: 127
|
you guys are bad to the bone...thanks
|
|
|
|
|
|
#6 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Don't mean to. The macros are written as 'Private'.
Click alt-f11 to open the visual basic editor. Press ctrl-r to view the project explorer. Look for the workbook in question and expand the file and all of the folders. Double click on each 'object' in the folders, there's probably code in one of them. Hope this is more helpful. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|