#1   Report Post  
BillCPA
 
Posts: n/a
Default VBA Code Windows

Is there any way to set the parameters (or change the default parameters) for
the various VBA windows - code, properties, etc. - to control where they
display on the screen and their size?

--
Bill @ UAMS
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

First, set a reference (VBA Editor Tools menu, References) to the
"Microsoft Visual Basic For Applications Extensibility 5.3"
library. Then you can use the Window object to control the
Window properties of a specified CodePane.


With
ThisWorkbook.VBProject.VBComponents("Module1").Cod eModule.CodePane.Window
Debug.Print .Top, .Left, .Height, .Width
End With



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"BillCPA" <Bill @ UAMS wrote in message
...
Is there any way to set the parameters (or change the default
parameters) for
the various VBA windows - code, properties, etc. - to control
where they
display on the screen and their size?

--
Bill @ UAMS



  #3   Report Post  
BillCPA
 
Posts: n/a
Default

The solution below has worked for the code windows for VBA worksheets and
modules. It also works for the form 'code' window, but does not work for the
form window - the window in which the form itself is displayed.

Here is what I am using:

For Each cmpComponent In cmpComponents
cmpName = ThisWorkbook.VBProject.VBComponents(cmpComponent.N ame).Name

ThisWorkbook.VBProject.VBComponents(cmpName).CodeM odule.CodePane.Window.Top =
12
..
..
..
next cmpComponent

Is there something that needs to be specified (seems like you might use
'FormPane' instead of 'CodePane', but of course you don't) to get it to work
for the form?

I've always wondered if a response to an old question was posted, it would
ever get noticed. I guess I'll find out. If I don't hear something in a
couple of days, I'll try you on your web site.

--
Bill @ UAMS


"Chip Pearson" wrote:

First, set a reference (VBA Editor Tools menu, References) to the
"Microsoft Visual Basic For Applications Extensibility 5.3"
library. Then you can use the Window object to control the
Window properties of a specified CodePane.


With
ThisWorkbook.VBProject.VBComponents("Module1").Cod eModule.CodePane.Window
Debug.Print .Top, .Left, .Height, .Width
End With



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"BillCPA" <Bill @ UAMS wrote in message
...
Is there any way to set the parameters (or change the default
parameters) for
the various VBA windows - code, properties, etc. - to control
where they
display on the screen and their size?

--
Bill @ UAMS




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
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 4th 05 10:50 AM
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 3rd 05 03:40 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM


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