+ Reply to Thread
Results 1 to 2 of 2

jumping to the next row

  1. #1
    Registered User
    Join Date
    02-07-2008
    Posts
    60

    jumping to the next row

    Hi again

    Sorry for this easy question but I am new in VBA.

    How to get my cell to the next row if it reachs the border of the defined range?

    Dim myCell As Range
    Dim myRange As Range
    Dim rowsCnt As Integer
    Dim ColumnsCnt As Integer
    Dim i As Integer
    Dim j As Integer

    Set myCell = Range("G6")
    Set myRange = Range("G6:M15").CurrentRegion
    rowsCnt = Range("G6:M15").CurrentRegion.Rows.Count
    ColumnsCnt = Range("G6:M15").CurrentRegion.Columns.Count

    For i = 0 To rowsCnt

    For j = 0 To ColumnsCnt - 1

    Set myCell = myCell.Offset(0, 1)
    myCell.Select

    Next j
    Next i

    Please advise
    Thank you

  2. #2
    Registered User
    Join Date
    08-18-2008
    Location
    Singapore
    Posts
    79
    Hi there, is this what you need:

    Please Login or Register  to view this content.

+ 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. jumping coulumns
    By gavster in forum Excel General
    Replies: 2
    Last Post: 06-17-2008, 05:19 AM
  2. Jumping forwards and backwards with Hyperlinks ?
    By kccboy2004 in forum Excel General
    Replies: 5
    Last Post: 05-21-2008, 02:14 AM
  3. Replies: 4
    Last Post: 04-09-2008, 02:04 PM
  4. Replies: 2
    Last Post: 03-05-2008, 03:44 PM
  5. Printing From Macro Without Jumping Around
    By RickT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2007, 01:52 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