MakeWeb Method

Microsoft FrontPage Visual Basic

Creates a new Web site from an existing folder. To create a new Web site without first creating a folder, see the Add method.

Security   Avoid using hard-coded passwords in your applications. If a password is required in a procedure, request the password from the user, store it in a variable, and then use the variable in your code. For recommended best practices on how to do this, see Security Notes for Microsoft Office Solution Developers.

expression.MakeWeb(UserName, Password)

expression    An expression that returns a WebFolder object.

UserName    Optional String. The logon name of the user. You can use this option to create a default user name for the Web site.

Password    Optional String. The password of the user. You can use this option to create a default password for the Web site.

Example

This example creates a new Web site from an existing folder named "Distributors, " which is a folder in the Rogue Cellars Web site. This example assumes that there is a Web site on your local computer named Rogue Cellars that contains a folder named Distributors. Alternatively, you can substitute a different Web site and folder name.

Private Sub MakeWeb()
    Dim myWeb As WebEx
    Dim myFolder As WebFolder

    Set myWeb = Webs("C:\My Web Sites\Rogue Cellars")
    myWeb.Activate

    Set myFolder = Active.RootFolder.Folders("Distributors")
    myFolder.MakeWeb
End Sub