ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Accessing a Hidden and Protected Workbook from a Macro?? (https://www.excelbanter.com/excel-programming/298289-accessing-hidden-protected-workbook-macro.html)

djbasumatari

Accessing a Hidden and Protected Workbook from a Macro??
 
I have the following issue -

1) Hide the "Data" worksheet
2) Now protect the workbook with a password

Now from a macro, how do I access this "Data" worksheet. Someone pleas
help me.

Basically I don't want other users to view the Data worksheet but wan
to access this work sheet from a macro.

Regards
D.J. Basumatar

--
Message posted from http://www.ExcelForum.com


Rob van Gelder[_4_]

Accessing a Hidden and Protected Workbook from a Macro??
 
Even if it's hidden, you can still do stuff with it.

Sub test()
MsgBox Worksheets("Sheet1").Range("A1").Value
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"djbasumatari " wrote in
message ...
I have the following issue -

1) Hide the "Data" worksheet
2) Now protect the workbook with a password

Now from a macro, how do I access this "Data" worksheet. Someone please
help me.

Basically I don't want other users to view the Data worksheet but want
to access this work sheet from a macro.

Regards
D.J. Basumatari


---
Message posted from http://www.ExcelForum.com/




Frank Kabel

Accessing a Hidden and Protected Workbook from a Macro??
 
Hi
this is no probelm. Try something like the following:

sub foo()
dim wks as worksheet
set wks = worksheets("Data")
wks.range("A1").value=12
end sub

-----Original Message-----
I have the following issue -

1) Hide the "Data" worksheet
2) Now protect the workbook with a password

Now from a macro, how do I access this "Data" worksheet.

Someone please
help me.

Basically I don't want other users to view the Data

worksheet but want
to access this work sheet from a macro.

Regards
D.J. Basumatari


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com