+ Reply to Thread
Results 1 to 2 of 2

Altering ranges in other worksheets without selecting them

  1. #1
    Registered User
    Join Date
    10-19-2006
    Posts
    37

    Altering ranges in other worksheets without selecting them

    Hi guys,

    I have looooots of code in this workbook. One of the macros takes about 2 minutes to run and I want to implement a status bar. I am confident I can implement the status bar, however I am having issues altering cells on other worksheets without actually having them selected.

    To give you an example, please look at the following code (note RowStart and ColStart are defined by other variables:


    Please Login or Register  to view this content.
    This code doesn't work. If I knew The start cell was going to be Range("A2") then it would work but I need to use Cells as the location is variable.

    Note also that it would work if the code was:

    Please Login or Register  to view this content.
    But this would mean the user has to watch the macro function and can't view the status bar. Is there away around this?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Jw191,

    There are only a few instances where cells or ranges need to be selected for a VBA action to work. Here is a code example that shows 2 ways to copy the data from one worksheet to another without having to select anything.

    Please Login or Register  to view this content.
    If you have any questions, let me know.

    Sincerely,
    Leith Ross

+ 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