What's the correct way to use vba to open a file as readonly? I've looked at the help in vb but can't get the code to work properly. I want to allow varied access to different users of my file. Some will have all access and others I want to limit to view only, no printing, changing, etc. I have my file set up now so that upon opening it disables the File menu, asks for a password before printing, I even have the main sheet hidden and requires a password before viewing, but this seems like alot of different things to add to a file instead of just allowing certain access to different users.
If I can just do something like:
dim name as string
name = Inputbox("Enter your name")
if name = "Joe" then
activeworkbook.open(readonly)
elseif
name = "Sara" then
activeworkbook.open
end if
something along those lines.
thanks,
If I can just do something like:
dim name as string
name = Inputbox("Enter your name")
if name = "Joe" then
activeworkbook.open(readonly)
elseif
name = "Sara" then
activeworkbook.open
end if
something along those lines.
thanks,