Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBE takes two tries to hear me clearly...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Did you hear that Frank? Kevin wants you to become Alias #3, Just FYI Spanky deMonkey Excel Discussion (Misc queries) 0 March 21st 08 11:25 PM
Why can I not hear the words recorded on powerpoint? Sonshine Excel Discussion (Misc queries) 1 October 2nd 07 09:16 PM
Event (BeforeSave) - How to test VBA code? Dave P. can you hear me now? EagleOne Excel Discussion (Misc queries) 3 September 14th 06 07:46 PM
anyone ever hear of a formula beginning "xlend"? excelmix Excel Discussion (Misc queries) 3 September 11th 06 02:00 PM
Saving so others can hear linked sound dfalgoust Excel Discussion (Misc queries) 0 August 27th 06 11:55 PM


All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"