Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: No macros...but still asked

  1. #1
    Board Regular
    Join Date
    May 2002
    Location
    Frankfort, KY
    Posts
    139
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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
    I'll link to it out of respect:
    http://www.cpearson.com/excel/vbe.htm
    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-02 08:37 ]

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    Board Regular
    Join Date
    May 2002
    Location
    Frankfort, KY
    Posts
    139
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #5
    Board Regular
    Join Date
    May 2002
    Location
    Frankfort, KY
    Posts
    139
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    you guys are bad to the bone...thanks

  6. #6
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •