Hide/Show button with multiple functions

Gewcebawcks

New Member
Joined
Apr 18, 2011
Messages
1
Hi. First and foremost, let me thank anyone who takes time out of their day to look at my problem. Programming is not my strong suit. :)

So here's the info: I'm building a sheet for our sales agents to use to track information about their clients. On the first page, it's an address gathering form and I currently have buttons on the page that hide/show rows (effectively, and "Add Another Location? button). These are NOT Active X, but the form tool buttons. I'm using this code:

Sub AdditionalLocation2()
Dim myRng As Range

Set myRng = Range("14:14,15:15,16:16")

myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)

End Sub

What I would like to do, is when the button is pressed, it can hide/show other parts of the workbook as well. If they add a second location, then Sheet3 ("Quote - Loc2") will appear (this is a sheet within the same workbook). In addition, I'd like to also hide/show info/data on the last page ("Order DGF"), so if they fill out information for location 1,2,3,4... there isn't any blank spaces on location 5,6...

I hope that's not too confusing. Any assistance that's provided will be GREATLY appreciated. I'm pulling my hair out on this one. lol
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,518
Messages
6,179,261
Members
452,901
Latest member
LisaGo

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