Hi Friends,

I am working on a excel vba file which is working fine one the system where windows 7 is installed but Ms Visio is not installed.
the same code does not work on the system where MS visio 2013 is installed.

here is the code:
------
Private Sub Workbook_Open()

Sheet12.Activate


If Sheet11.CommandButton1.Enabled = True Then


Sheet11.CommandButton2.Enabled = False

Else

Sheet11.CommandButton2.Enabled = True

End If


End Sub
-------
Error:
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error:

Method or data member not found
---------------------------
OK Help
---------------------------

This does not give any error where ms visio is not installed.

on MS visio systems it gives the below error while opening the file as the macro is applied on open workbook event...


---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error in hidden module: ThisWorkbook.
This error commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click "Help" for information on how to correct this error.
---------------------------
OK Help
---------------------------


Please suggest a solution.

thanks in advance.