Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Opening a web page in Excel (Manually vs Macro)

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This continues to baffle me...I have Excel XP.

    It takes me approximately 5 seconds to manually open a web page in excel and then close it.

    If I write a short code to open that same webpage then close it (without anything being done in between) it takes 3x as long.

    Why? I know XP has a lot more features than previous versions of Excel and therefore will take slightly longer, but I wouldnt think a macro should take 3-4x as long compared to manually doing a task.

    Are there any settings that I may have set that are limiting me from optimally performing this task? Can anyone think of anything? I'm very frustrated.

    Thanks, Derek

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    there might be something that makes it take longer post your code,


  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Post your code Derek...
    Maybe someone in here can clean it up.
    Probably not me, but someone else.
    By the way, you're not using a loop, are you?
    Inside Joke!
    Tom

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    To simply open & close a webpage

    dim ID as integer
    ID = 1
    Workbooks.Open Filename:= _
    "http://www.testing.com/?user_id=" & ID

    ActiveWindow.Close
    Application.DisplayAlerts = False



    [ This Message was edited by: Derek_35 on 2002-04-23 21:30 ]

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    im curious as to why you have the code close the window just after you open it and why you have display alerts at the end of your code?

    Also i have xp as well and it opens just as fast if not faster with a macro!


    [ This Message was edited by: brettvba on 2002-04-23 21:49 ]

  6. #6
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, that code is worthless. It only opens then closes.

    I have a small amount of code between the open and close obviously, but the point I was trying to make was even with the code I provided, it is taking me 15-20 seconds to open and close a webpage in Excel.

    There has to be something wrong. I'm on a 1.8 GHz machine with 512 megs of RAM and a DSL 1M/1M line.

    Are there any settings that could be a little screwy?

    -----------------

    I've just determined that 80% of my time holdup is on the close, if that helps anything.

    [ This Message was edited by: Derek_35 on 2002-04-23 22:11 ]

  7. #7
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If anyone cares...

    I figured out my problem. I had published so much information previously and I never deleted them, therefore each time something closed it was saving all of my previous published files!

    I think there was 8 of them...

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •