View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about something like:

Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long

Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Sub auto_open()
Dim myWidth As Long
Dim myHeight As Long

'with tools|references|microsoft internet controls unchecked
Dim MSIEApp As Object
Set MSIEApp = CreateObject("InternetExplorer.Application")

'with tools|references|microsoft internet controls checked
'Dim MSIEApp As InternetExplorer
'Set MSIEApp = New InternetExplorer

With Application
.WindowState = xlMaximized
myWidth = .Width
myHeight = .Height
.WindowState = xlNormal
.Left = 0
.Width = myWidth
.Top = myHeight / 2
.Height = myHeight / 2
End With


With MSIEApp.Application
.Visible = True
.Top = 0
.Left = 0
.Height = GetSystemMetrics(SM_CYSCREEN) / 2
.Width = GetSystemMetrics(SM_CXSCREEN)
End With
End Sub


If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm



wrote:

Is there a way in Excel 2000 that when I open a file that it will
resize and position the excel application in the top 1/2 of the screen
? then I can have my browser in the lower 1/2 of the screen where I get
my data from.

Thanks,
Chris


--

Dave Peterson