I get "invalid outside procedure" error with the following code. Could someone please tell me where I go wrong here.
Dim Asset As String, AssetURL As String
Asset = Range("B1").Value
If Asset = "1" Then
AssetURL = "X:\Docs\excel0001.xls"
Elseif Asset = "2" Then
AssetURL = "X:\Docs\excel0002.xls"
End If
Range("C1").Value = AssetURL