Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can i do this??

Is it possible to hide rows in a worksheet with a macro so that it look
as if though the cells were deleted then make them reappear with
separate macro

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Can i do this??

Option Explicit
Private mOldHeight

Sub Hide()
mOldHeight = Range(Rows(1), Rows(3)).RowHeight
Range(Rows(1), Rows(3)).RowHeight = 0
End Sub

Sub Unhide()
Range(Rows(1), Rows(3)).RowHeight = mOldHeight
End Sub

Sub Main()
Hide
MsgBox "Row Height: " & mOldHeight
Unhide
End Sub

Bob

"majikman " wrote in message
...
Is it possible to hide rows in a worksheet with a macro so that it looks
as if though the cells were deleted then make them reappear with a
separate macro?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Can i do this??

A simpler way would be:
Rows("4:9").EntireRow.Hidden = True

Recording a macro is a good way to figure these sort of questions out.
Go to Tools/Macro/Record Macro and then do the action that you want
to automate manually.

Cheers,
Andrew



"Bob Kilmer" wrote in message ...
Option Explicit
Private mOldHeight

Sub Hide()
mOldHeight = Range(Rows(1), Rows(3)).RowHeight
Range(Rows(1), Rows(3)).RowHeight = 0
End Sub

Sub Unhide()
Range(Rows(1), Rows(3)).RowHeight = mOldHeight
End Sub

Sub Main()
Hide
MsgBox "Row Height: " & mOldHeight
Unhide
End Sub

Bob

"majikman " wrote in message
...
Is it possible to hide rows in a worksheet with a macro so that it looks
as if though the cells were deleted then make them reappear with a
separate macro?


---
Message posted from http://www.ExcelForum.com/

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



All times are GMT +1. The time now is 11:03 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"