+ Reply to Thread
Results 1 to 2 of 2

Need to find way to loop code

  1. #1
    Registered User
    Join Date
    11-10-2017
    Location
    United States
    MS-Off Ver
    7
    Posts
    2

    Need to find way to loop code

    Hi
    Is there a way to loop this? The only thing changing is the range and only the letters change alphabetically.
    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Need to find way to loop code

    Hi emjay,

    Instead of using Range("F4") and Range("G17") use instead the Cells(RowNum, ColNum) format

    Then something like
    For ColNum = 6 to columns("AZ").column Step = 2
    ..
    IE.document.All("itemCodeTextField").Value = ThisWorkbook.Sheets("Inventory Outlook").Cells(4,ColNum)
    IE.document.All("quantityTextField").Select
    IE.document.All("quantityTextField").Value = ThisWorkbook.Sheets("Order Sheet").Cells(17,ColNum +1)
    ...

    Next ColNum

    I hope that makes sense. If not keep asking.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. vba code to find row base on some conditions without using a loop or filter
    By s_samira_21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2015, 09:51 AM
  2. Find and Display results VBA Code - Loop to find all Matches
    By i2rule in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 03:14 PM
  3. Find, loop and paste code not working
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-19-2014, 10:31 PM
  4. Do Until / Loop code to find max value in many adjacent columns?
    By vcchin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-20-2010, 08:10 PM
  5. Put Find code in Loop to find all matches
    By SarahPintal in forum Excel General
    Replies: 4
    Last Post: 02-08-2010, 09:05 PM
  6. Code To Find and Offset works on first sheet but won't loop to other sheets
    By mgaworecki in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-10-2009, 03:02 PM
  7. Need VBA code to terminate a find loop
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2005, 05:06 PM

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