Results 1 to 7 of 7

Run time error 1004-some pretty simple VBA.

Threaded View

garyi Run time error 1004-some... 01-10-2011, 08:33 AM
teylyn re: Run time error 1004-some... 01-10-2011, 08:37 AM
snb re: Run time error 1004-some... 01-10-2011, 08:59 AM
Norie re: Run time error 1004-some... 01-11-2011, 02:24 AM
romperstomper re: Run time error 1004-some... 01-11-2011, 05:05 AM
garyi re: Run time error 1004-some... 01-12-2011, 12:19 PM
romperstomper re: Run time error 1004-some... 01-12-2011, 02:11 PM
  1. #1
    Forum Contributor
    Join Date
    08-31-2010
    Location
    andover
    MS-Off Ver
    Excel 2007
    Posts
    102

    Run time error 1004-some pretty simple VBA.

    Hello everyone.

    I have a really confusing issue with some pretty simple VBA.

    The user is presented with thirteen pop up boxes with a simple Yes or No. If the use selects yes then this reveals some cells if no then they remain hidden.

    here is the problimatic code:

    Sub hide6()
    
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    ActiveSheet.Unprotect
        If Range("K13").Value = "2" Then
            Range("164:180").EntireRow.Hidden = True
            
        Else
            Range("164.180").EntireRow.Hidden = False
          
        End If
        ActiveSheet.Protect
    Application.ScreenUpdating = True
    Application.EnableEvents = True
    
    End Sub
    It looks alright to me, and infact the other 12 are identical to this except the ranges and sub name are different.

    Its only this one that reports the error.

    I have checked and rechecked the actual cell ranges incase any thing funky is there but there is nothing. No ranges over lap each other in the modules so I am at a loss really.

    Any ideas?
    Last edited by teylyn; 01-10-2011 at 08:36 AM. Reason: changed php to code tags

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