+ Reply to Thread
Results 1 to 4 of 4

Assign cell as range to another...as range either

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Assign cell as range to another...as range either

    Hello,

    How can I assign a cell as range to another one as range either?
    I need to keep the range of that cell to use later on.

    The following sample code gives me an error.

    Please help.
    Thanks!


    Please Login or Register  to view this content.
    Last edited by MoonAlert; 08-14-2014 at 09:55 PM.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Assign cell as range to another...as range either

    Hello MoonAlert, please take some time to read the forum rules if you haven't. You should post code within
    Please Login or Register  to view this content.
    [/noparse] tags.

    As for your problem, you have declared cel1 as a String.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Assign cell as range to another...as range either

    Thanks for answer.
    That was a mistake when paste a sample code here...I declare as range and get the error with it.

    Please Login or Register  to view this content.

    (Sorry break that rule!)

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Assign cell as range to another...as range either

    So now the problem is because cel2 is Nothing, you have declared it but it's not instantiated with any range/cell.

    If you want to store cel1 in cel2, it should be:
    Please Login or Register  to view this content.

+ 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. Assign value to cell based on range in another tab
    By MARCETICD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2014, 09:09 AM
  2. Assign a range through a string cell value
    By Aristizabal95 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 11:33 PM
  3. Excel 2007 : Assign Macro to Cell Range?
    By stevetothink in forum Excel General
    Replies: 6
    Last Post: 09-15-2011, 12:17 PM
  4. Assign a Dropdown list to a range of cells from values of other range
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2011, 10:39 AM
  5. Recursively traverse through a range and assign a value to each cell in range
    By itzchau in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-11-2010, 12:44 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