Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS VB compile error for Visio in Excel 2002 on open

Status
Not open for further replies.

DrAW

Instructor
Dec 18, 2001
10
0
0
US
When I initiate Excel 2002, I immediately get a Visual Basic error, "Sub or Function not defined" in the debugger for Insert Visio Button.XLS. The debugger window has the following:
----------------------------------
Private Sub Workbook_Open()
Dim xlWkBook As Workbook

Call AddYeOleInsertVisioDrawingButton
ThisWorkbook.Saved = True

Workbooks.Add

End Sub
----------------------------------
The "AddYeOleInsertVisioDrawingButton" line is highlighted.

I use Visio, but not in Excel. I would like to fix the error by either fixing the reference to the function or remove the reference. Any suggestions?
 
if u don't use Visio within Excel, just go to the sub and under file choose remove module and say no when asked if u want to export it.
 
Sorry, I don't understand what you mean by "...go to the sub..."
 
two ways. when u go to the debugger window, u r already in the sub. at that point go to file and choose remove module. if it's greyed out, go to run, and ckick reser first.



else, u can always go to tools, macro, visual basic editor and find the module (listed in the left pane) and remove it.
 
my fingers don't go where i wish them to go when i type, so again

two ways. when u go to the debugger window, u r already in the sub. at that point go to file and choose remove module. if it's greyed out, go to run, and click reset first.



else, u can always go to tools, macro, visual basic editor and find the module (listed in the left pane) and remove it.

 
Okay. I was in debugger, [File][Remove ThisWorkbook...] was greyed out. Clicked on [Run][Reset] (didn't see any change or response), [File][Remove ThisWorkbook...] was still greyed out. In Excel, went VisualBasic Editor, found the module (workbook Open) and deleted the reference to Vision.
Doesn't error upon open any more but makes me wonder what dependencies I may have violated by bypassing the Microsoft Help or setup functions.
Thanks for the suggestions.
 
the macro is supposed to add a visio button in ur Excel.

if u want the button back, all u need to do is go to
C:\Program Files\Visio\System\Custom and double-click
Insert Visio Button.exe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top