How to open correct Module window in VBE by macro

K

K

I am trying to open Workbooks("TEST.xlsm") VBEProject window by macro
from the button which is in Workbooks("ABC"). The code below works
fine but problem is that, I want Workbooks("TEST.xlsm") Sheet Module
to appear in VBEProject window when I click the button. But for some
reason when i click the button macro shows Workbooks("ABC") Sheet
Module in VBEProject window even I have mentioned
Workbooks("TEST.xlsm") in macro code. How can I make
Workbooks("TEST.xlsm") Sheet Module to appear in VBE when I click
button from Workbooks("ABC"). Please can any friend can help

sub OpenVBE ()
Workbooks("TEST.xlsm").Application.VBE.MainWindow.Visible = True
Workbooks("TEST.xlsm").Application.VBE.MainWindow.SetFocus
End Sub
 
N

NoodNutt

K

Sounds like the file was saved with macro's disabled

Hence, no macro's, no code to view.

Get whoever sent you the file to save it as xlsx and re-send it to you.

HTH
Mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top