+ Reply to Thread
Results 1 to 7 of 7

Hide Row Column Headers

  1. #1
    Registered User
    Join Date
    06-03-2007
    Posts
    11

    Hide Row Column Headers

    I would like to hide the Row and Column Headers when a worksheet is activated.
    I have generated code by recording a macro in Excel, but where do I place it to make it automatically activate?

    Thanks
    Greg

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Greg,

    You would place the necessary code into the ThisWorkbook code page, in the Workbook_Open event.

    (In the VBA Project window, beneath your workbook's grouping you should see 'ThisWorkbook'. Simply double-click on that, then select 'Workbook' from the General drop-down list in the right-hand window, and select Open in the second drop-down.)

  3. #3
    Registered User
    Join Date
    06-03-2007
    Posts
    11
    Paul,

    Thank for your reply.
    I tried it but it will not let me use 'Activesheet' in the code.
    It will not even let me run the macro I recorded. It tells me
    it is expecting a Function or variable.

    Greg

  4. #4
    Registered User
    Join Date
    04-09-2006
    Location
    London
    Posts
    70
    Greg,

    You would place the code inside the 'Thisworkbook' node.

    Choose Workbook/SheetActivate event and insert your code.

    e.g:

    Please Login or Register  to view this content.
    Kind Regards,
    I LOVE THIS PLACE!!!

  5. #5
    Registered User
    Join Date
    06-03-2007
    Posts
    11
    Kayote,
    I couldn't get this to run either.
    Your Workbook_Open code appears to have no procedure in it.
    Am I missing something here?
    Greg

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You can do this manually,Tools menu, Options then the View Tab. You wills see Row & Column headers. If you really want VBA then use the Worksheet_Activate event

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    06-03-2007
    Posts
    11
    Thanks for the help.

    I'm going with the manual method.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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