+ Reply to Thread
Results 1 to 4 of 4

Counters

Hybrid View

halem2 Counters 06-30-2006, 04:37 PM
halem2 ok I figured out the Counter ... 06-30-2006, 04:44 PM
Guest Re: Counters 06-30-2006, 04:55 PM
halem2 thanks!!! I just got it... 06-30-2006, 04:59 PM
  1. #1
    Thyagaraj
    Guest

    Re: Counters


    halem2 wrote:
    > Hi folks:
    >
    > I have some code I need to run let's say 10 times on the same sheet.
    > How can I use counters s I don't have to retype the code 10 times?
    >
    > Also, how can I go to the following sheet to the right after the code
    > executes the 10th time on that sheet?
    >
    > thanks
    >
    >
    > --
    > halem2
    > ------------------------------------------------------------------------
    > halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930
    > View this thread: http://www.excelforum.com/showthread...hreadid=557473


    Dear Halem2,

    You can use the following code :-

    Sub Repeat1()
    Dim N
    N = 1
    Do Until N = 10
    'enter the code which needs to be repeated
    N = N + 1
    Loop
    'Next sheet Selection
    ActiveSheet.Next.Select
    End Sub



    Regards
    Thyagaraj Shetty C.N
    Bangalore


  2. #2
    Registered User
    Join Date
    05-26-2004
    Posts
    61
    thanks!!! I just got it working using

    For Each SH In ActiveWorkbook.Worksheets
    SH.Activate
    my code
    Next

    thanks a lot

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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