Excel macro - Hide/Unhide specific number of lines in other worksheets with button in other worksheet

DominikS

New Member
Joined
Jun 27, 2011
Messages
1
Hi everybody. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Thanks so much already for all of your help. I have no clue about macros whatsoever but with the help of this forum I was able to mount quite a nice form in excel already. I just have one pickle left to be figured out. Unfortunately I was not able to find a suitable solution for this pickle in google. <o:p></o:p>
<o:p></o:p>
Here is the case:<o:p></o:p>
<o:p></o:p>
I have a workbook with 24 worksheets. The first four are forms to be filled out, the following 20 are eAgreements (text) which data from the first 4 worksheets are copied into. Those 20 are not to be edited by users and will be hidden or unhidden according to the information in the 4 forms.<o:p></o:p>
In the 3<SUP>rd</SUP> form I have a price table which is to be edited by the user and then copied (by button) into all visible eAgreements as attachment. I have a macro for that. <o:p></o:p>
<o:p></o:p>
Problem:<o:p></o:p>
I need the “price sheet” attachment in each eAgreement to automatically change size with the price table from worksheet 3. I want it to work with buttons that hide/unhide the number of needed lines specified by the user in a cell. <o:p></o:p>
So here is what I need:<o:p></o:p>
<o:p></o:p>
Configure a Button inside "3. PriceSheet" to do the following:<o:p></o:p>
1) in "3. PriceSheet": unhide entire rows starting with row 20 and ending with row = [20 + number in cell G19 of "3. PriceSheet"]<o:p></o:p>
2) in all worksheets whose names start with "eAgreement" do the following:<o:p></o:p>
unhide entire rows starting with row 166 and ending with row=[166 + number in cell G19 of "3. PriceSheet"]<o:p></o:p>
<o:p></o:p>
Hope someone can help me with this. Thanks so much in advance,
<o:p></o:p>
Dominik<o:p></o:p>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top