+ Reply to Thread
Results 1 to 2 of 2

Active sheet issues

  1. #1
    Registered User
    Join Date
    12-22-2013
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    6

    Active sheet issues

    hi all and thank you in advance
    Specific issue: based on values in col 1 on sheet "dec" i want to copy data off of sheet "bin" and paste to sheet 3. I have researched and am using the activate option as shown in the pic. this command takes and i assume the sheet "bin" becomes the active sheet. the next line is intended to select a range of cells on that sheet but what happens is that the cells in the range option refer to values on sheet "dec" according to the correct row and col index and not what i presume to be the active sheet.
    what am i missing?Picture3.gif
    thank you

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Active sheet issues

    Instead of activating worksheets make sure you fully reference anything, then you can be guaranteed the correct sheets are being referred to.

    If you want to know what I mean post your code and I'll try and show you.

    By the way, where is the code located?

    If it's in a worksheet module any reference to a range will refer to a range on the worksheet whose module the code is in.

    For example, if this was in the Sheet1 module it would refer to A1:B20 on Sheet1, no matter which sheet was active.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

+ 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. [SOLVED] save active sheet in new workbook, naming it as cell value of active sheet
    By arkharova.s in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2014, 06:16 AM
  2. Replies: 1
    Last Post: 01-04-2014, 06:37 PM
  3. [SOLVED] Userform ComboBox.List Location and Active Sheet Issues
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 09:55 PM
  4. how can worksheet_activate event of active sheet work of active workbook
    By tahir mahmood in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2011, 08:19 AM
  5. [SOLVED] Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 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