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?
 

Some videos you may like

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,531
Messages
5,602,209
Members
414,513
Latest member
junbuggle

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