Run Method Example

This example runs a macro from another procedure.

Note   To run this example, you must have a web named Rogue Cellars or you can substitute different web in place of the Rogue Cellars web. Copy the following procedures into a code module and run StartMacro.

Private Sub StartMacro()
Dim myMacro As String

myMacro = "OpenRogueCellars"
Run (myMacro)
End Sub

Sub OpenRogueCellars()
Dim myWeb As Web

Set myWeb = Webs.Open("C:\My Webs\Rogue Cellars")
End Sub