+ Reply to Thread
Results 1 to 19 of 19

Activating/De-Activating Comments or only if the Cell is Active.

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Activating/De-Activating Comments or only if the Cell is Active.

    Activating/De-Activating Comments only if the Cell is Active.

    Dear Forum,

    Is it possible to Activate OR De-Activate Comments only if the Cell is Active...
    OR
    Is it possible to Activate Tool Tip Comments only if the Cell is Active ot when the mouse is hovered over the cell...

    I have columns in which there the Total Amount which will be huge and can be running in Millions and Billions ( Lakhs and Crores) for my indian counterparts...

    I have a code which i got from the forum which converts Numbers-Into-Words i.e Indian Currency Rupees ..

    Please Login or Register  to view this content.

    To make it easier for a person to check the figure entered with the numbers in words, I would like to get a comment only till the cell is active and not otherwise..

    So when the cell is not selected then there should be no indication for the RED bookmark which is an indication of an comment..

    I need to show the text in the ToolTip as words so this would need to be dynamic and not static.

    DOnt know what happens if a Range is selected..

    Warm Regards
    e4excel
    Last edited by e4excel; 09-09-2011 at 12:43 PM.

  2. #2
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Dear Forum,

    Can any event be triggered by simply selecting a cell and not entering any information, like kets say I have a column filled with numbers expressing the cost for an organisation and its quite huge so want to just get the number into words in the comments....

    Warm Regards
    e4excel

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    That's how cell comments work
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Yes Roy,

    However I want the comments to get generated when the cell is selected and not when the cell comments are already present done explicitly manually...

    What you mentioned is right but I want that to get created and destroyed every time a new cell is selected in a particular column excluding the first title row and more than a certain column length ...

    Warm Regards
    e4excel

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    hi, e4excel, may be something like that would help, try to select cell in column A
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    First and Foremost, sorry for the late resposne...
    Net Speed bad for psoting the reply..

    Yes Watersev,
    Thats exactly one part of it that I wanted to get but also to be interpreting the values in the target cell...like 10,000 mentioned as Rupees Ten Thousand only through a UDF mentioned in the second post...SPELLINDIAN

    Anyways is it also possible to have different comments based on three different values..

    Lets say my column has a drop-down containing three elements..

    Fixed Cost : I want to get the definition of Fixed Cost when I select any cell containg the text as "Fixed Cost"

    Variable Cost : I want to get the definition of Fixed Cost when I select any cell containg the text as "Variable Cost"

    Semi-Variable Cost : want to get the definition of Fixed Cost when I select any cell containg the text as "Semi-Variable Cost"

    IS that possible too...

    Its very useful to see the definition each time when alloting items as Fixed,Variable or Semi-Variable..etc..

    Warm Regards
    e4excel

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    i'm not sure I've got your idea, can you post sample workbook showing what you need to get as a result?

    Comment text can display UDF result with any other text if required.

    Does it come any close to your requirement?
    Attached Files Attached Files
    Last edited by watersev; 08-27-2011 at 02:22 PM.

  8. #8
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Dear Watersev,

    Thanks a lot for the help offered, I am posting a Workbook for reference...

    There are a lot of formatting things involved in this comments as well..

    There are 2 Columns viz. Column F and Column H where I want the Dynamic comments to appear..

    In the column H I want the Comment to be created with respect to the amount in the cell selected in the column and converted to words using the UDF SpellIndian shown in the Module 2..

    In the Column F, however there are only three elements which are from the Drop-Down I want the comment to be dynamic i.e. for the Fixed Cost -- the comment would be the definition for the Fixed Cost and for other values it will be different..

    Hope this explains what Im after..

    I would also prefer this to be in a Tool-Tip if possible rather than a comment due to the very nature of the topic of Fixed Cost..etc..

    P.S. Please explain wherever neccessary as well as upload a file rather than the code as I have attached the actual file...

    Warm Regards
    e4excel
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    thanks for a short lecture on cost types, I have a master degree in economics and marketing. Please check if it helps
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Well,

    Thats good to know then Watersev as I dont hold a Business Degree, and it becomes all the more important for me to imbibe that in my mind while adding the different expenses and costs involved for a company set-up...via the comments...

    Anyways, nothings happening in that file..I checked it !

    Please do check or advise if Im missing anything..

    Also, is it possible to have Multi-coloured comments for the different Cost Elements as shown in my example file...

    Now Gud Night to me as its 4:oo am...

    SO, take your time till tommorow...

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    it seems you have events turned off, try to run the following code:

    Please Login or Register  to view this content.
    and check attachment
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Dear Watersev,

    I dont get it, I ran the small sub and still it did not work...

    There are no comments appearing in either the Column F or Column H...

    Please advise..

  13. #13
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    the comment appears in H column when cell starting from H2 is selected, it works as expected on my side

  14. #14
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Dear Watersev,
    Thanks and sorry for the trouble..

    I think it worked, I dont know what went wrong earlier but now the only thing i did was that I saved the file on my desktop and then tried and it worked..

    DOes tryin it without saving must have caused the problem earlier?


    It worked beautifully but I actually wanted two seperate comments for the Columns F and Column H..

    The Column H should have comment values such as Fixed Cost-Defn & Explanation if the selected cell in the COl H contains the value as "Fixed Cost" or else if it contains the value "Variable Cost" then the Variable cost information and same for the "Semi-Variable Cost" then semi-variable cost..

    So the comments in the Column H should show different values and the Comments are based on the selection of the items in the drop-down..

    Warm Regards
    e4excel

  15. #15
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    when you download a book and open it without saving it might cause problems to run code as the file is stored in temporary files folder. If you have Application.DisplayAlerts turned off the system will not show you error message.

    Can we put it simple: could you please write comments that must appear for cells: H2 and H5 and F column if applicable.

  16. #16
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Ok now I get it so each time when I try new files with solutions just need to download them first for avoidng such errors..

    But I have already put the comments in my Attachment Watersev...

    What I meant was to get different comments in the column F...now forget column H as you have already finished the work for column H..

    In COl F , there should be different comments depending on the selection of the values as Fixed Cost, Variable Cost and Semi-variable Cost..

    If i select the value as Fixed Cost from the dropdown then I should get a comment for the "Fixed Cost" as shown in my attacment...

    Likewise for the other values in the dropdowns for Variable Cost and Semi-variable Cost..

    regrds

  17. #17
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    please check attachment
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Hey Watersev,

    Sorry for the late response , due to bad weather it seems that the internet connectivity has been affected and im getting disconnected intermittently..

    Anyways, this is exactly what I wanted to do except for the last thing I want this comment to be Multicoloured...and Multi-Formatted...

    I propose to include a few more things like ...
    For any Cost Type:

    Definition - same as Textcolor for Definition/ Underline / Font Size =12 and Italic.
    Explanation - FontColor - Black Fontsize =10
    Example - FontColor -Blue ( Dark) Fontsize = 10
    Formula - FontColor -Teal ( Dark Green ) Fontsize = 12
    Mathematical Example : FontColor -Purple Fontsize = 12

    Now, the entire text is going to be BOLDENED...

    Is this possible? and the Comment Autoshape can be a Folded Corner -16 and with white background...and Autosized as for some Cost Types there is more information than the other....

    Your code is excellent but instead of the fixed breakpoints can we have dynamic ones..
    I can change the Comment Text with Fixed Starting Points and Ending Points by using breakers like catchments for Definition : "[" for Start and "]" for End..

    Please advise if this possible ...

    Warm Regards
    e4excel

  19. #19
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Activating/De-Activating Comments or only if the Cell is Active.

    Dear Watersev,

    The solution provided is very good and Im going to use it extensively but if the colouring part also if possible would be an Icing on the Cake...

    Just wanted to know , the varaibles are explicitly mentioned inside the Switch Case:

    CommH = 90

    CommW = 282

    TxtItEnd = 97

    TxtColStart = 18

    Is it not possible to get the dynamic values so that we could have different starting and ending points for different cost types as the amount of text would be different for each cost type..

    If the formatting is possible then I would change the format to have the definition and other stuff with definitie start points..?

    Warm regards
    e4excel

+ 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