LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default Macro Runtime Error 1004... help?

error: Unable to set the Hidden Property of the Range Class

code:
under Worksheet, Change.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3")) Is Nothing Then Exit Sub
Rows("6:47").EntireRow.Hidden = False
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("D2,C6,D6,C7,D7,C8,D8,C9,D9,C14,F17,F18") = 0
Range("C25,F30,F31,F32,F33,F44,F45,F46,F47") = 0

If Range("B3") = "Standardized Module Width" Then
Rows("6:6").EntireRow.Hidden = False
:
Rows("47:47").EntireRow.Hidden = False

Range("C8,D8") = 0
Range("F10") = "=F6*F9"
:
Range("F47") = 0

ElseIf Range("B3") = "Standardized Module Height" Then
Rows("6:6").EntireRow.Hidden = True
:
Rows("47:47").EntireRow.Hidden = True

Range("C6,D6") = 0
Range("F10") = "=F7*F8"
Range("F15") = "=IF((F8+SUMMARY!E6)=F9,F9,F8)"
:
Range("F47") = "=IF((F8+SUMMARY!E6=F9),2,1)"

ElseIf Range("B3") = "Non-Modular Frame" Then
Rows("6:6").EntireRow.Hidden = True
Rows("8:8").EntireRow.Hidden = True
Rows("10:10").EntireRow.Hidden = True
Rows("15:47").EntireRow.Hidden = False

Range("C6,D6") = 0
Range("C8,D8") = 0
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("F17,F18,F30,F31,F32,F33,F44,F45,F46,F47") = 0
End If
End Sub


when Debugging, The highligted row is the "Rows("6:47").EntireRow.Hidden =
False"
when i delete that row, it goes to the next .entirerow.hidden = true/false
code.

this problem started when i copied my template sheet (which used this code)
to make dupicates of the template. now none work.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro runtime 1004 error on opening worksheet Shaggyjh Excel Discussion (Misc queries) 5 May 6th 09 12:37 PM
unable to protect cells in macro sheet b/c runtime error 1004 rldjda Excel Worksheet Functions 1 March 20th 08 08:28 PM
Macro runtime error 1004 with Autofilter Lorna B Excel Discussion (Misc queries) 3 May 25th 07 08:38 PM
runtime error '1004' Steve Excel Discussion (Misc queries) 1 April 28th 06 08:58 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"