Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Window Manipulation

Using the following code, I can change the size and location of the windows
in the VBA Editor that display the VBA code and forms. Is there some way to
do the same with the other windows - project window, watch window, etc.?

ThisWorkbook.VBProject.VBComponents(name).CodeModu le
ThisWorkbook.VBProject.VBComponents(name).Designer Window

--
Bill @ UAMS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Window Manipulation

Application.VBE.Windows("Immediate")
Application.VBE.Windows("Watches")
Application.VBE.Windows("Project - VBAProject")

If this post helps click Yes
---------------
Jacob Skaria


"BillCPA" wrote:

Using the following code, I can change the size and location of the windows
in the VBA Editor that display the VBA code and forms. Is there some way to
do the same with the other windows - project window, watch window, etc.?

ThisWorkbook.VBProject.VBComponents(name).CodeModu le
ThisWorkbook.VBProject.VBComponents(name).Designer Window

--
Bill @ UAMS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Window Manipulation

You can get a reference to these window with code like the following.
Once you have the reference, you can move and size them as you like.

Dim ImmWindow As VBIDE.Window
Dim WatchWindow As VBIDE.Window
Dim ProjectWindow As VBIDE.Window
Dim W As VBIDE.Window

For Each W In Application.VBE.Windows
Select Case W.Type
Case vbext_wt_Immediate
Set ImmWindow = W
Case vbext_wt_Watch
Set WatchWindow = W
Case vbext_wt_ProjectWindow
Set ProjectWindow = W
Case Else
' ignore
End Select
Next W

Debug.Print ImmWindow.Caption, ImmWindow.Visible
Debug.Print WatchWindow.Caption, WatchWindow.Visible
Debug.Print ProjectWindow.Caption, ProjectWindow.Visible

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Sat, 30 May 2009 11:25:01 -0700, BillCPA <Bill @ UAMS wrote:

Using the following code, I can change the size and location of the windows
in the VBA Editor that display the VBA code and forms. Is there some way to
do the same with the other windows - project window, watch window, etc.?

ThisWorkbook.VBProject.VBComponents(name).CodeModu le
ThisWorkbook.VBProject.VBComponents(name).Designer Window

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Window Manipulation

Thank you - you certainly know your stuff.

--
Bill @ UAMS


"Chip Pearson" wrote:

You can get a reference to these window with code like the following.
Once you have the reference, you can move and size them as you like.

Dim ImmWindow As VBIDE.Window
Dim WatchWindow As VBIDE.Window
Dim ProjectWindow As VBIDE.Window
Dim W As VBIDE.Window

For Each W In Application.VBE.Windows
Select Case W.Type
Case vbext_wt_Immediate
Set ImmWindow = W
Case vbext_wt_Watch
Set WatchWindow = W
Case vbext_wt_ProjectWindow
Set ProjectWindow = W
Case Else
' ignore
End Select
Next W

Debug.Print ImmWindow.Caption, ImmWindow.Visible
Debug.Print WatchWindow.Caption, WatchWindow.Visible
Debug.Print ProjectWindow.Caption, ProjectWindow.Visible

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Sat, 30 May 2009 11:25:01 -0700, BillCPA <Bill @ UAMS wrote:

Using the following code, I can change the size and location of the windows
in the VBA Editor that display the VBA code and forms. Is there some way to
do the same with the other windows - project window, watch window, etc.?

ThisWorkbook.VBProject.VBComponents(name).CodeModu le
ThisWorkbook.VBProject.VBComponents(name).Designer Window


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
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
Docking Project Explorer, Properties window and Code window in VBE jayray Setting up and Configuration of Excel 2 March 27th 07 04:42 PM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation vmegha Excel Programming 2 December 19th 05 12:14 AM


All times are GMT +1. The time now is 07: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"