Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default is it possible to toggle display of project window with control-R

Dear Group,

In the VBA IDE is there a keyboard shortcut that will toggle the
display of the VBA project window? Control-R displays this windows,
but doesn't hide it, which is unfortunate.

For example, in the MZTools 3.0 VBA-IDE utility one can enable
keyboard toggles for the Watch and Locals windows, but evidently not
for the Project window or Immediate window.

Thanks,

Brian Murphy
Austin, Texas

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default is it possible to toggle display of project window with control-R

I don't think there is a shortcut key defined to do this. The code to do it
would be

Dim ActiveProj As Object
Set ActiveProj = Application.VBE.ActiveVBProject
If Not ActiveProj Is Nothing Then
Application.VBE.Windows("Project - " & ActiveProj.Name).Visible = False
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

wrote in message
ups.com...
Dear Group,

In the VBA IDE is there a keyboard shortcut that will toggle the
display of the VBA project window? Control-R displays this windows,
but doesn't hide it, which is unfortunate.

For example, in the MZTools 3.0 VBA-IDE utility one can enable
keyboard toggles for the Watch and Locals windows, but evidently not
for the Project window or Immediate window.

Thanks,

Brian Murphy
Austin, Texas



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default is it possible to toggle display of project window with control-R

Hello there,

No keyboard shortcut to hide the Project Explorer window. Sorry. Although,
you can do so via code...

Application.VBE.Windows(2).Close

There are other windows you can use as well...

1: Module1 (Code) *2: Project - VBAProject
4: Properties - Module1
5: Object Browser
6: Watches
7: Locals
8: Immediate

* Followed by all modules, then class modules, then userforms. So the
numbers will change depending on how many variables you have. The first
example above is with only one standard code module, hence the number two.
You can use the "Properties - VBAProject" name for a string syntax. If you
have changed the name you can use the following..

Application.VBE.Windows("Project - " &
Application.VBE.ActiveVBProject.Name).Close

To view a list of what you have, use ...

Sub showVBEwindows()
Dim i As Long
For i = 1 To 100
On Error GoTo TheEnd
Debug.Print i & ": " & Application.VBE.Windows(i).Caption
Next i
TheEnd:
End Sub

HTH

--
Regards,
Zack Barresse, aka firefytr



wrote in message
ups.com...
Dear Group,

In the VBA IDE is there a keyboard shortcut that will toggle the
display of the VBA project window? Control-R displays this windows,
but doesn't hide it, which is unfortunate.

For example, in the MZTools 3.0 VBA-IDE utility one can enable
keyboard toggles for the Watch and Locals windows, but evidently not
for the Project window or Immediate window.

Thanks,

Brian Murphy
Austin, Texas


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
Docking Project Explorer, Properties window and Code window in VBE jayray Setting up and Configuration of Excel 2 March 27th 07 04:42 PM
Shortcut Menu With Toggle Control quartz[_2_] Excel Programming 0 February 10th 05 02:23 PM
Project still in "project explorer" window after file closed down! Gunnar Johansson Excel Programming 16 December 22nd 04 06:21 PM
Project still in "project explorer" window after file closed down! Gunnar Johansson[_3_] Excel Programming 0 December 7th 04 01:43 PM
Toggle Control & Formula Michael[_10_] Excel Programming 2 September 16th 03 12:44 PM


All times are GMT +1. The time now is 12:13 AM.

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

About Us

"It's about Microsoft Excel"