Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Code requested to require password to view the form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
charlie6067 - 03 May 2006 16:36 GMT
I have a form template that requires publishing in a public directory
but the form can only be viewed by one team for their use. Unless you
have other suggestions, is there a way (and code) to require a password
to display the form? This will be a different password than the private
one that unlocks the template for editing. Is this possible?

Thanks,
Charlie
charlie6067
Greg Maxey - 03 May 2006 17:58 GMT
Hmm...I suppose that if the project is locked, that you could use
something like:

Sub LoadYourForm()
Const oPWord = "The Password"
Dim UF As YourFormName

If InputBox("Enter the password", "Password") = oPWord Then
 Set UF = New YourFormName
 UF.Show
Else
 Exit Sub
End If
Unload UF
Set UF = Nothing
End Sub
charlie6067 - 04 May 2006 17:39 GMT
Greg - many thanks for the code. Just what I was looking for.
Appreciate your help.
Charlie
charlie6067

> Hmm...I suppose that if the project is locked, that you could use
> something like:
[quoted text clipped - 12 lines]
> Set UF = Nothing
> End Sub
Greg Maxey - 04 May 2006 18:36 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.