+ Reply to Thread
Results 1 to 10 of 10

Make the macro display the cell addresses affected.

  1. #1
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Make the macro display the cell addresses affected.

    Hello!

    I tried to modify this to get the AffectedCell.Address displayed in the msgbox, but only succeed in getting the ActiveCell.Address (and just "cell" doesn't work). What else do I need to add to this?



    Please Login or Register  to view this content.

    Thanks for your help!

    VR/Lost

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,241

    Re: Make the macro display the cell addresses affected.

    Hi learning,

    Go to VBA and View the Object Browser. Change to Excel and search for the word "Affected". There is no object or method with that word in it. What do you mean when you say "The Affected Cell"?

    If an entire worksheet is dependent on a single cell and you change that one cell's value, should the message box list all cells that change, based on formulas? Is this what you mean by Affected?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Make the macro display the cell addresses affected.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Make the macro display the cell addresses affected.

    Please Login or Register  to view this content.
    Last edited by nimrod; 02-14-2011 at 04:01 PM.

  5. #5
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: Make the macro display the cell addresses affected.

    Nimrod,

    You are taking this to a whole 'nother level.... Your code gets smaller and smaller each time.

    a) The version I posted has the text of what each object is (Textbox, comment, etc.) which I like. (Yours just lists it as a "4" or "6".)

    b) I couldn't get the 2nd version to work. 1004 Error on "objList=..." (This is with Excel 2003, so that may be why.)


    MarvinP: What you are saying is what my question was about . My macro is great in that it shows that the object exists. But it doesn't list where the object is. That is what I was trying to add. I know that ActiveCell.Address wasn't right, but I didn't know what to put in its place to list the specific cell where that object is.

    Thanks all!

    VR/Lost

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Make the macro display the cell addresses affected.

    Hi Leaning:

    The demo does , however , give you what you wanted ... it shows you how to get the objects position on the page. i.e. .BottomRightCell.Address . There is also another property call TopLeftCell.Address.

    so in your code it would be ActiveSheet.Shapes(x).BottomRightCell.Address

    Cheers

  7. #7
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Make the macro display the cell addresses affected.

    This solution shows the name of the type instead of typeCode.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Make the macro display the cell addresses affected.

    Please Login or Register  to view this content.



  9. #9
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: Make the macro display the cell addresses affected.

    All,

    Nimrod: For the code on post #7, it is saying that Comments are Text Boxes. AFA everything else, you fixed my code in #6 and in addition provided more concise, alternate codes which did the same thing...that's good help!

    snb: I am going to take a look at your code and compare its output to my Nimrod-enhanced code and Nimrod's other code. Thanks for that!

    Good stuff!

    VR/Lost

  10. #10
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: Make the macro display the cell addresses affected.

    Nimrod,

    Topleft and Bottomright aren't working.

    I put both of our codes in a workbook and then put a comment and a txtbox on a sheet. When the codes run, the macro addresses don't match the actual sheet addresses.

    See attached.

    (Hmmmm..)

    VR/Lost
    Attached Files Attached Files

+ 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