Macro with a Password protection

HotNumbers2001

Board Regular
Joined
Apr 21, 2002
Messages
139
First I would like to thank those who have helped me in the Past. All of you have been wonderful, specially on my more challenging questions. Well I hope my next questions is not that difficult.

I need to HIDE with a PASSWORD Protection Rows with certain types of information, Here is what I have.

I have rows tagged with either H/C, Cost, or CAHC. I need to Hide all ROW the have COST, But At the same time I need H/C and CAHC be available for editing. The reason why I need this done is, because this file Will be shared with a group of people, some people can see the Cost row and some can’t. I am the only one that can see the cost row.

This is what the workbook looks like.

H/C
Cost
CAHC
H/C
Cost
CAHC
H/C
Cost
CAHC

Also is it possible to hide Sheets with a Password Protection?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
Sub MyHide()
'This "Hides" any Row in Column(A) that = "Cost" in rows 1 to 10.
'By J.S. Was, 6-12-2001.
'Place code in a standard module.
Dim i
For i = 1 To 10
With Intersect(Columns(1), ActiveSheet.UsedRange)
Rows(i).Select
If .Rows(i).Value = "Cost" Then
Selection.EntireRow.Hidden = True
End If
End With
Next
End Sub

Hope this helps. JSW
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,943
Messages
5,856,430
Members
431,813
Latest member
seconduser

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
Top