I have a situation where I have a excel file that contains info that only certain people should be able to see All the Data. I decided to create a VBA script that when the file is saved, It saves Two copies of this file, one for un-privileged users to see certain data, and the original for privileged users to see everything.
After the File was saved for the Unprivileged, I need to scan through it and blank out the cells that they should not see.
What I have so far is this:
![]()
Dim NumberOfSheets as Integer Dim CurrentSheetRowCount as Integer Dim CurrentSheetColumnCount as Integer NumberOfSheets = ThisWorkbook.Sheets.Count Dim i As Integer For i = 1 To NumberOfSheets ThisWorkbook.Sheets(i).Activate CurrentSheetRowCount = ActiveSheet.Row.Count CurrentSheetColumnCount = ActiveSheet.Column.Count Dim j as Integer Dim k as Integer For j = 1 to CurrentSheetColumnCount For k = 1 to CurrentSheetRowCount ' Search for value that contains $ ' Blank Cell Next Next Next
So, Im not sure if I am starting this in the correct way, but for what i have, I am stuck now on how to access a cell and read its value based on the row and column index.
Can someone give me a hand?
Bookmarks