+ Reply to Thread
Results 1 to 8 of 8

How to put content of active cell in variable?

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    How to put content of active cell in variable?

    Hey there,

    I would like to know how I can put the content of the active cell, I go to with this loop, in a varaible.

    Please Login or Register  to view this content.
    When I proceede with something like:
    Please Login or Register  to view this content.
    my variable "cvalue" contains the position of the active cell but not the number that is in that cell.

    Does anyone knwo how to fix that??

    THX, Obgle

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to put content of active cell in variable?

    Try this

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: How to put content of active cell in variable?

    Hey Mike, good to see you again ;-)

    Thanks alot for your answear, unfortunately the value of cvalue is always "0" with your code. Might there be a problem with the formate of my numbers? They al look like this: 11-3401-9970-1-92

    Thanks, Obgle

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to put content of active cell in variable?

    Give this a try.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to put content of active cell in variable?

    Hey Germany,

    Didnt realize it was you.

  6. #6
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: How to put content of active cell in variable?

    Yap, it's me :-)

    And you solved my problem... again! Genious!

  7. #7
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: How to put content of active cell in variable?

    Hey one more Question:

    What is Debug.Print doing?

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to put content of active cell in variable?

    It prints to the Immediate window inside the VBE Editor. Instead of me trying to explain heres a Good link that will tell you all about it.

    http://www.cpearson.com/excel/debug.htm

+ 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