+ Reply to Thread
Results 1 to 6 of 6

Hiding a column issue

  1. #1
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    Hiding a column issue

    I have a workbook that opens to a certain sheet and the form opens perfectly when the workbook opens. But when i use the macor to reopen the form using this sub it hangs up. It will not hide column "F". The problem is in the highlighted red line. Thanks for you input and help

    Sub OpenUserForm()

    ActiveWorkbook.Sheets("VILLAGEvisits").Activate
    Columns("F").Hidden = True
    FrmVillageVisits.Show

    End Sub

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Hiding a column issue

    Is the sheet protected?
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    Re: Hiding a column issue

    Yes the sheet is protected. I think you may be pointing me in that direction as the problem. The first row must never be changed - it contains headers that match an Access DB so it can import the sheet. So to prevent users from potentially changing it I protected the sheet.

  4. #4
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Hiding a column issue

    When you protect a sheet and try to hide a column without first unprotecting it, it will throw up error.

  5. #5
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Hiding a column issue

    Try;

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    Re: Hiding a column issue

    Yes, that took care of the issue. I never realized protecting would cause a problem like that. Thank you so very much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 10-30-2011, 09:24 AM
  2. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2011, 06:49 AM
  3. [SOLVED] Issue with Hiding Sheets Depending on Workbook Name
    By Kris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2006, 10:35 AM
  4. Issue with Hiding Columns
    By chris100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2006, 06:17 PM
  5. [SOLVED] Hiding column/row labels --without hiding entire columns/rows
    By daniel.wolff@csfb.com in forum Excel General
    Replies: 2
    Last Post: 10-18-2005, 10:05 PM

Tags for this Thread

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