Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, so I edit my VBA a lot. In Word, I made sneaky macros to
quickly open my add-ins, etc., in the VBA editor and display specific code modules. Now that I'm soaking in Excel, I tried the same sort of code, and it SORT OF works: Sub EditMT() Dim w As Workbook Set w = Workbooks.Open(Filename:="C:\Path\MTstuff.XLS") w.VBProject.VBComponents("Module1").CodeModule.Cod ePane.Show End Sub Now, what would cause this to show a totally different VBA project the *first* time it's run during an Excel session. (Typically it shows the project that's alphabetically first in the project explorer, if that means anything). It works properly for the rest of the session. (Of course, the first time tends to be when I want it open most urgently!) I have 4 custom buttons to open different projects, and they misbehave identically, so it's not related to the file being opened. TIA -- Mark Tangard , Microsoft Word MVP "Life is nothing if you're not obsessed." --John Waters |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Did you hear that Frank? Kevin wants you to become Alias #3, Just FYI | Excel Discussion (Misc queries) | |||
Why can I not hear the words recorded on powerpoint? | Excel Discussion (Misc queries) | |||
Event (BeforeSave) - How to test VBA code? Dave P. can you hear me now? | Excel Discussion (Misc queries) | |||
anyone ever hear of a formula beginning "xlend"? | Excel Discussion (Misc queries) | |||
Saving so others can hear linked sound | Excel Discussion (Misc queries) |