+ Reply to Thread
Results 1 to 4 of 4

How to store the row number in a array in Workbook_SheetChange

  1. #1
    Registered User
    Join Date
    10-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    25

    Exclamation How to store the row number in a array in Workbook_SheetChange

    Hi ,
    I need to store the row number of selected cell in a array which i have coded in Workbook_SheetChange event.The array has been intialized in Module and I'm using the reference of that array in ThisWorkbook.Workbook_SheetChange event.But not able to store the all the row no of the selected cells ,Its throwing error as Type Mismatch
    Please help any suggestion .

    In Module i have declared the array as
    Please Login or Register  to view this content.
    In the Workbook_SheetChange event

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: How to store the row number in a array in Workbook_SheetChange

    Why are you using Workbook_SheetChange instead of Worksheet_Change on Sheet CM ?
    Last edited by patel45; 01-17-2014 at 07:13 AM.
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to store the row number in a array in Workbook_SheetChange

    You cannot Redim an array that was declared with its dimensions (a fixed array). You can only redim an array declared with no dimensions (a dynamic array).

    Try this...

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 01-17-2014 at 04:29 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    10-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: How to store the row number in a array in Workbook_SheetChange

    Thanks AlphaFrog

+ 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. Store array formula content in a VBA array
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-19-2013, 02:24 PM
  2. [SOLVED] Store value from an array in new variable
    By vizzkid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 05:03 AM
  3. [SOLVED] How do you store a value in an array without quotes?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2013, 10:51 AM
  4. Array does not store value
    By yeaster in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2008, 11:36 AM
  5. Lookup and store in array
    By kanuvas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2005, 06:50 AM

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