+ Reply to Thread
Results 1 to 4 of 4

breaking with statements to pieces

Hybrid View

  1. #1
    Registered User
    Join Date
    12-19-2013
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    breaking with statements to pieces

    Hi guys, I just want to break this code to pieces, without using the with statements. I have having trouble about the second with statement in my given code...can someone give me an explanation. I know that this code is perfect for automating this site to auto log in.. thanks in advance

    Sub ExcelForum_LogIn()
        With CreateObject("InternetExplorer.Application")
            .Visible = True
            .Navigate ("http://www.excelforum.com/")
            Do While .ReadyState <> 4 Or .Busy = True
                DoEvents
            Loop
            With .Document.getElementByID("navbar_loginform")
                .Elements("vb_login_username").Value = "myname"
                .Elements("navbar_password").Value = "mypassword"
                .Submit
            End With
        End With
    End Sub

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: breaking with statements to pieces

    What do you mean by 'break' the With statements?

    Is the code not working and you want to find out why?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-19-2013
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: breaking with statements to pieces

    sorry bout my question there. I just want to expand that codes above without using the with end statement. The code above is working great , just want to study it bit more.. thanks

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: breaking with statements to pieces

    If you want to study the code I would suggest introducing some variables.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Please explain the pieces of this code
    By freshfruit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2014, 06:00 PM
  2. Looking up several pieces of data
    By darylpaskell in forum Excel General
    Replies: 0
    Last Post: 10-16-2013, 11:50 AM
  3. [SOLVED] Looking up a value based on two pieces of information
    By jshaw82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-11-2013, 03:48 PM
  4. Parsing into three pieces
    By Viewson in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-26-2011, 06:18 AM
  5. Average of 3 pieces of data from within a row
    By Virant518 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-13-2010, 02:33 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1