Ah right. Excel. The code i'm trying to run is:
Sub UpdateOptions()
Dim VisioApp As Object
Dim vsoPage As Visio.Page
Set VisioApp = GetObject(, "Visio.Application")
Visio.Application.Windows("Document.vsd").Activate
Set vsoPage = VisioApp.ActiveDocument.Pages("Model")
If vsoPage.Layers("Option02") = conVisible Then
excelapp.Workbook("Spreadsheet").Worksheets("Sheet1").Range("E8").Value = "Yes"
End If
End Sub
So the code should look at the Visio document thats already open, determine if a layer is visible or not, and change the value in a cell. When I step through, I get the error on the line in my OP.
Bookmarks