Results 1 to 2 of 2

VBA error

Threaded View

jackson_hollon VBA error 11-21-2014, 03:00 AM
zbor Re: VBA error 11-21-2014, 03:25 AM
  1. #1
    Forum Contributor
    Join Date
    06-07-2013
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    485

    VBA error

    I have used the following codes:

    1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

    2. Click Insert > Module, and paste the following code in the Module Window.

    VBA: Hide all named ranges in Excel

    <strong>Sub HideNames()
    'Update 20140318
    Dim xName As Name
    For Each xName In Application.ActiveWorkbook.Names
    xName.Visible = False
    Next
    End Sub
    </strong>

    3. Then press F5 key to run this code, and all of the named ranges in your workbook have been hidden.

    However, after I hit F5, it pop up a window asking me for Macro name. After I add a name, then it show up a i=window saying there is compile error. I really do not know what I have done wrong. I have attached sample here. Can someone please take a look and let me know what I have done wrong? Thanks.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  2. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1