control the positioning and the size of the window

EDUCATED MONKEY

Board Regular
Joined
Jul 17, 2011
Messages
218
My set up office 2007 win xp pro ie 8
I am using the code below to retrieve web pages etc it works fine, however it display in differ areas of the screen, so I was wondering if there is a way to control the positioning and the size of the window?
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Rich (BB code):
Rich (BB code):
Rich (BB code):
  Set EXP = CreateObject("InternetExplorer.application")
                            EXP.Visible = True
                               EXP.Navigate (aurl)
                    Do While EXP.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
             ' Application.Wait (Now + TimeSerial(0, 0, 5))
                                 SendKeys "^a"
                               SendKeys "^c"
        Application.Wait (Now + TimeSerial(0, 0, 3))
                      Worksheets("Recieved Data").Select
                      Worksheets("Recieved Data").Range("A1").Select
ActiveSheet.PasteSpecial Format:="text", LINK:=False, DisplayAsIcon:= _
   False
 Application.ScreenUpdating = True
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
If you want to change the size and position of the IE window:

Code:
With oIE ' oIE instead for Exp
        .Left = 100
        .Top = 100
        .Width = 200
        .Height = 200
End With
See:

http://www.mrexcel.com/forum/showthread.php?t=485219

for more information on this

For the Excel window:

Code:
With Application
        .WindowState = xlNormal
        .Left = 200
        .Width = 300
        .Height = 200
        .Top = 100
End With
 
Upvote 0
Thank you reading the code it seems reasonable in the unlikly event i have any problems i will get back to you
and thanks for taking the time to post your reply
regards pete
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top