Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 1004 Error when hiding/unhiding rows

Hi there. I have a simple piece of code that was written in Excel 2007, but
saved in 97-2003 Excel format. This code seems to work fine in both Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when he is
clicking on the drop-down box. When debugging, the error seems to be occuring
on the first 'entirerow.hidden' instruction. No movements between worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default 1004 Error when hiding/unhiding rows

You might try simplifying a little.


Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").EntireRow.Hidden = False
Rows("11:13").EntireRow.Hidden = True
Rows("63:64").EntireRow.Hidden = False
Rows("67:68").EntireRow.Hidden = False
Rows("73:82").EntireRow.Hidden = False
Rows("87:88").EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub

Regards,
Paul
--

"ianb" wrote in message
...
Hi there. I have a simple piece of code that was written in Excel 2007,
but
saved in 97-2003 Excel format. This code seems to work fine in both Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when he
is
clicking on the drop-down box. When debugging, the error seems to be
occuring
on the first 'entirerow.hidden' instruction. No movements between
worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 1004 Error when hiding/unhiding rows

I have never used xl2000 but try this

'Application.ScreenUpdating = False

If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Hidden = False
Rows("11:13").Hidden = True
Rows("63:64").Hidden = False
Rows("67:68").Hidden = False
Rows("73:82").Hidden = False
Rows("87:88").Hidden = False
End If

' Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi there. I have a simple piece of code that was written in Excel 2007,
but
saved in 97-2003 Excel format. This code seems to work fine in both Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when he
is
clicking on the drop-down box. When debugging, the error seems to be
occuring
on the first 'entirerow.hidden' instruction. No movements between
worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 1004 Error when hiding/unhiding rows

Hi Don / PCLIVE

Many thanks for your help. I've given this a go at home on my Excel 2000,
and it seems to work. Simplifying is the way forward! I'll send this off to
my client, and hopefully it'll work on their Office 2000 too! Thanks once
again.

Ian

"Don Guillett" wrote:

I have never used xl2000 but try this

'Application.ScreenUpdating = False

If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Hidden = False
Rows("11:13").Hidden = True
Rows("63:64").Hidden = False
Rows("67:68").Hidden = False
Rows("73:82").Hidden = False
Rows("87:88").Hidden = False
End If

' Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi there. I have a simple piece of code that was written in Excel 2007,
but
saved in 97-2003 Excel format. This code seems to work fine in both Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when he
is
clicking on the drop-down box. When debugging, the error seems to be
occuring
on the first 'entirerow.hidden' instruction. No movements between
worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 1004 Error when hiding/unhiding rows

Glad to help. Maybe?? its the "entirecolumn" part.???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi Don / PCLIVE

Many thanks for your help. I've given this a go at home on my Excel 2000,
and it seems to work. Simplifying is the way forward! I'll send this off
to
my client, and hopefully it'll work on their Office 2000 too! Thanks once
again.

Ian

"Don Guillett" wrote:

I have never used xl2000 but try this

'Application.ScreenUpdating = False

If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Hidden = False
Rows("11:13").Hidden = True
Rows("63:64").Hidden = False
Rows("67:68").Hidden = False
Rows("73:82").Hidden = False
Rows("87:88").Hidden = False
End If

' Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi there. I have a simple piece of code that was written in Excel 2007,
but
saved in 97-2003 Excel format. This code seems to work fine in both
Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when
he
is
clicking on the drop-down box. When debugging, the error seems to be
occuring
on the first 'entirerow.hidden' instruction. No movements between
worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 1004 Error when hiding/unhiding rows

I've just tried it again, and it didn't work. I think the problem is that in
Excel 2007, when you protect a worksheet, you can leave the 'format rows and
columns' unprotected. But, in Excel 2000, it doesn't have this option, and
therefore it believes that hiding or unhiding rows is not allowed due to the
protection.

Any ideas?!

"Don Guillett" wrote:

Glad to help. Maybe?? its the "entirecolumn" part.???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi Don / PCLIVE

Many thanks for your help. I've given this a go at home on my Excel 2000,
and it seems to work. Simplifying is the way forward! I'll send this off
to
my client, and hopefully it'll work on their Office 2000 too! Thanks once
again.

Ian

"Don Guillett" wrote:

I have never used xl2000 but try this

'Application.ScreenUpdating = False

If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Hidden = False
Rows("11:13").Hidden = True
Rows("63:64").Hidden = False
Rows("67:68").Hidden = False
Rows("73:82").Hidden = False
Rows("87:88").Hidden = False
End If

' Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ianb" wrote in message
...
Hi there. I have a simple piece of code that was written in Excel 2007,
but
saved in 97-2003 Excel format. This code seems to work fine in both
Excel
2007 and 2003, but not in Excel 2000. He gets a 1004 error message when
he
is
clicking on the drop-down box. When debugging, the error seems to be
occuring
on the first 'entirerow.hidden' instruction. No movements between
worksheets
occur. Any help would be appreciated!

Thanks, Ian


Sub ColourMonoChoose()
'
' DropDown29_Change Macro
'

'
Application.ScreenUpdating = False
If Range("d8") = "Colour" And Range("d6") = "MFP" Then
Rows("10:13").Select
Selection.EntireRow.Hidden = False
Rows("11:13").Select
Selection.EntireRow.Hidden = True
Rows("63:64").Select
Selection.EntireRow.Hidden = False
Rows("67:68").Select
Selection.EntireRow.Hidden = False
Rows("73:82").Select
Selection.EntireRow.Hidden = False
Rows("87:88").Select
Selection.EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub




Reply
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
hidden rows but not from hiding/unhiding? Reeder88 Excel Discussion (Misc queries) 1 March 12th 08 06:14 PM
unhiding and hiding rows Paul_of_Abingdon[_2_] Excel Discussion (Misc queries) 2 March 6th 08 03:22 PM
Hiding/unhiding rows Matheus Excel Discussion (Misc queries) 2 November 11th 07 11:20 PM
hiding/unhiding rows & columns with "+" and "-" buttons shellshock Excel Discussion (Misc queries) 2 August 3rd 05 05:22 AM
Hiding/Unhiding Bobby Excel Worksheet Functions 2 May 25th 05 10:40 PM


All times are GMT +1. The time now is 08:11 AM.

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

About Us

"It's about Microsoft Excel"