+ Reply to Thread
Results 1 to 6 of 6

Streching cells using worksheet_change

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Streching cells using worksheet_change

    Hi all, I have a problem using Worksheet_Change. The code is the following:

    Please Login or Register  to view this content.
    The problem arises when I put a value in one of the target cells (a1:a5) and I try to extend the same value with the common "streching" trick with the mouse. It gives me code error no. 13: type mismatch. Can someone explain it?
    Thank you very much

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Streching cells using worksheet_change

    Add this at the top and it will avoid the error
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Re: Streching cells using worksheet_change

    Yes cool trick! thanks!

  4. #4
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Re: Streching cells using worksheet_change

    ..but can I also run the code for each cell modified with stretching?

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Streching cells using worksheet_change

    Yes, perhaps better to loop through like so
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Re: Streching cells using worksheet_change

    That's perfect. Thanks again!

+ 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] Worksheet_Change VBA question - More than one cell - Dependant Cells
    By dredre609 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2014, 03:23 AM
  2. Worksheet_Change not firing when pasting to multiple cells.
    By bg819 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 11:41 AM
  3. Applying code to specific cells when using worksheet_change?
    By Bevmachine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2013, 11:37 AM
  4. error in Worksheet_Change with merged cells
    By lluisponce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2010, 02:36 PM
  5. Worksheet_Change with discontinuous cells
    By JKG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2005, 03:05 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