Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Code to Hide Rows

Help!

I dynamically add a worksheet during code execution in a module. I need to
also add a feature so that the user can toggle between hiding or displaying
individual rows of data. I'd thought of adding a toggle button but then
couldn't figure out how to dynamically add code to the "click" event for each
button. I then thought of creating hyperlinks to the rows but then could not
figure out how to trigger a call to a module subroutine that would hide or
display the row. Can anyone help? I'm baffled!

Example:
ROW COL1 COL2 COL3
[1] mom 1 59
[2] dad 2 61
[3] child 3 24

The user should be able to display/hide each row individually
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Code to Hide Rows

Thanks Don for responding. After reading my post, I realized I wasn't as
clear as I should have been.

I need to dynamically add a toggle button to the worksheet(s) that were
generated dynamically during code. I know that I can do this using the
AddOLEObject method. What I can't figure out is how to dynamically generate
code for the created object's "click" event so that it will hide/unhide a
specified row.



"Don Guillett" wrote:

One button only
Sub togglehiderow()
ActiveCell.EntireRow.Hidden = _
Not ActiveCell.EntireRow.Hidden
End Sub

--
Don Guillett
SalesAid Software

"BHatMJ" wrote in message
...
Help!

I dynamically add a worksheet during code execution in a module. I need
to
also add a feature so that the user can toggle between hiding or
displaying
individual rows of data. I'd thought of adding a toggle button but then
couldn't figure out how to dynamically add code to the "click" event for
each
button. I then thought of creating hyperlinks to the rows but then could
not
figure out how to trigger a call to a module subroutine that would hide or
display the row. Can anyone help? I'm baffled!

Example:
ROW COL1 COL2 COL3
[1] mom 1 59
[2] dad 2 61
[3] child 3 24

The user should be able to display/hide each row individually



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Code to Hide Rows


How about a "Template" worksheet with a FORMS button/or shape already
there assigned to my macro in a regular module.
--
Don Guillett
SalesAid Software

"BHatMJ" wrote in message
...
Thanks Don for responding. After reading my post, I realized I wasn't as
clear as I should have been.

I need to dynamically add a toggle button to the worksheet(s) that were
generated dynamically during code. I know that I can do this using the
AddOLEObject method. What I can't figure out is how to dynamically
generate
code for the created object's "click" event so that it will hide/unhide a
specified row.



"Don Guillett" wrote:

One button only
Sub togglehiderow()
ActiveCell.EntireRow.Hidden = _
Not ActiveCell.EntireRow.Hidden
End Sub

--
Don Guillett
SalesAid Software

"BHatMJ" wrote in message
...
Help!

I dynamically add a worksheet during code execution in a module. I
need
to
also add a feature so that the user can toggle between hiding or
displaying
individual rows of data. I'd thought of adding a toggle button but
then
couldn't figure out how to dynamically add code to the "click" event
for
each
button. I then thought of creating hyperlinks to the rows but then
could
not
figure out how to trigger a call to a module subroutine that would hide
or
display the row. Can anyone help? I'm baffled!

Example:
ROW COL1 COL2 COL3
[1] mom 1 59
[2] dad 2 61
[3] child 3 24

The user should be able to display/hide each row individually




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
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
Code to Hide Rows wx4usa Excel Discussion (Misc queries) 8 December 26th 08 07:56 PM
Macro/code to hide rows Smatass Excel Worksheet Functions 1 September 25th 07 01:57 AM
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) Thulasiram[_2_] Excel Programming 4 September 26th 06 04:15 AM


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