Results 1 to 5 of 5

Excel VBA - Move cursor to Next Page

Threaded View

Tejas.T Excel VBA - Move cursor to... 03-04-2014, 09:55 PM
AlphaFrog Re: Excel VBA - Move cursor... 03-04-2014, 11:30 PM
Tejas.T Re: Excel VBA - Move cursor... 03-04-2014, 11:47 PM
AlphaFrog Re: Excel VBA - Move cursor... 03-05-2014, 12:03 AM
Tejas.T Re: Excel VBA - Move cursor... 03-05-2014, 12:26 AM
  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Excel VBA - Move cursor to Next Page

    Hi,

    I have a listbox containing names of Sheets. I need to merge all those sheets into a Single sheet and save it as PDF.

    I need know address of 1st Cell on the next page.
    Please see below code and comment in it:

    For i = 0 To lstPrintSheet.ListCount - 1
            Set oFindRange = WS_Print.Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious)
            If oFindRange Is Nothing Then
                pRow = 1
            Else
                pRow = oFindRange.Row + 1
            End If
    
            ' instead of above logic, I want to assign pRow with the 1st Row on the next page.
            ' So suppose after pasting the contents, if my last used row in WS_Print is 255 on page# 4, I want pRow to assign to 1st row of page# 5 (So that next sheet gets pasted on next page)
    
             ThisWorkbook.Sheets(lstPrintSheet.List(i)).UsedRange.Copy WS_Print.Range("A" & pRow)
    
    Next
    Any Expert Advice for this please?
    Last edited by Tejas.T; 03-14-2014 at 12:39 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel:: Move Cursor to the end of an already populated cell
    By lss-bku in forum Excel General
    Replies: 3
    Last Post: 08-24-2012, 06:12 PM
  2. [SOLVED] Cursor doesn't move when page up or page down in Excel 2003
    By christiandad in forum Excel General
    Replies: 3
    Last Post: 12-12-2005, 12:10 PM
  3. Replies: 1
    Last Post: 08-26-2005, 03:05 PM
  4. [SOLVED] visual basic with Excel- how to move cursor right
    By countyworksheetthatfiguressickandvacatio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2005, 02:06 PM
  5. how to use cursor to move tables around in excel?
    By orangeisnice in forum Excel General
    Replies: 7
    Last Post: 03-16-2005, 09:06 PM

Tags for this Thread

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