Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Well, how hidden is it ??

I have noticed that if I hide a row and then set a range across that hidden
row, the value gets applied to the hidden cell:

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").Value = 1
Range("A2").EntireRow.Hidden = False
End Sub

The value gets applied to A2, even though the cell was hidden. If, however,
I hide the row using AutoFilter, the value in A2 does not get changed. It is
possible to apply this type of hiding without using AutoFilter??

--
Gary''s Student - gsnu200908
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Well, how hidden is it ??

On Nov 16, 3:47*pm, Gary''s Student
wrote:
I have noticed that if I hide a row and then set a range across that hidden
row, the value gets applied to the hidden cell:

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").Value = 1
Range("A2").EntireRow.Hidden = False
End Sub

The value gets applied to A2, even though the cell was hidden. *If, however,
I hide the row using AutoFilter, the value in A2 does not get changed. *It is
possible to apply this type of hiding without using AutoFilter??

--
Gary''s Student - gsnu200908


Good question, i don't have an answer, but I suggest doing it via
autofilter then (in code) turn the autofilter off. Maybe that would
work?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Well, how hidden is it ??

Try it this way...

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").SpecialCells(xlCellTypeVisible).Val ue = 1
Range("A2").EntireRow.Hidden = False
End Sub

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
I have noticed that if I hide a row and then set a range across that hidden
row, the value gets applied to the hidden cell:

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").Value = 1
Range("A2").EntireRow.Hidden = False
End Sub

The value gets applied to A2, even though the cell was hidden. If,
however,
I hide the row using AutoFilter, the value in A2 does not get changed. It
is
possible to apply this type of hiding without using AutoFilter??

--
Gary''s Student - gsnu200908


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Well, how hidden is it ??

Thanks Rick, good suggestion.
--
Gary''s Student - gsnu200908


"Rick Rothstein" wrote:

Try it this way...

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").SpecialCells(xlCellTypeVisible).Val ue = 1
Range("A2").EntireRow.Hidden = False
End Sub

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
I have noticed that if I hide a row and then set a range across that hidden
row, the value gets applied to the hidden cell:

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").Value = 1
Range("A2").EntireRow.Hidden = False
End Sub

The value gets applied to A2, even though the cell was hidden. If,
however,
I hide the row using AutoFilter, the value in A2 does not get changed. It
is
possible to apply this type of hiding without using AutoFilter??

--
Gary''s Student - gsnu200908


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Well, how hidden is it ??

You are welcome. By the way, don't forget to put in some error trapping in
your general code just in case all the cells are hidden.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
Thanks Rick, good suggestion.
--
Gary''s Student - gsnu200908


"Rick Rothstein" wrote:

Try it this way...

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").SpecialCells(xlCellTypeVisible).Val ue = 1
Range("A2").EntireRow.Hidden = False
End Sub

--
Rick (MVP - Excel)


"Gary''s Student" wrote in
message
...
I have noticed that if I hide a row and then set a range across that
hidden
row, the value gets applied to the hidden cell:

Sub sub1()
Range("A2").EntireRow.Hidden = True
Range("A1:A3").Value = 1
Range("A2").EntireRow.Hidden = False
End Sub

The value gets applied to A2, even though the cell was hidden. If,
however,
I hide the row using AutoFilter, the value in A2 does not get changed.
It
is
possible to apply this type of hiding without using AutoFilter??

--
Gary''s Student - gsnu200908


.


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
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da Tammy Excel Discussion (Misc queries) 3 April 2nd 09 11:40 PM
Copy and Paste with hidden columns remaining hidden Pendelfin Excel Discussion (Misc queries) 2 February 26th 09 11:35 AM
Rows hidden by Autofilter vs hidden by changing the Hidden property LEO@KCC Excel Programming 4 September 11th 07 10:14 AM
I need my Hidden Rows to stay hidden when I print the sheet. Rosaliewoo Excel Discussion (Misc queries) 2 July 20th 06 07:51 PM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM


All times are GMT +1. The time now is 06:56 PM.

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"