![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 465
|
Hello to all!!! I have a report in which users are to make changes to specific cells. I would like the value in the cell to bold once the change is made. I would also prefer not to share the workbook.
Any suggestions would be greatly appreciated. Thanks, Anthony |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
|
Regarding the cells bolding when they are changed, first, unbold all the cells in your range, then right click on your sheet tab, left click on View Code, and paste this in:
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Target, Range("A1:D20")) Is Nothing Then Exit Sub Target.Font.FontStyle = "Bold" End Sub Modify for range of interest. As for not wanting to share the workbook, I'm not sure what level of security (such as the limited extent to which that concept actually applies to Excel) you want. For starters, try clicking on Tools > Protect Workbook, then enter a password. Any help? |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 465
|
Works very well Tom....Thanks! However, once the change is made and it bolds the number, I cannot undo my last action. Also, the range in which you suggested that I un-bold everything unfortunately causes me to un-bold those numbers that are intended to remain bolded at all times. I guess I would have to go back into those specific cells and re-bold them manually---unless you have any other suggestions.
Thanks Again, Anthony |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
|
Regarding your second point, the range in the code should be modified by you to suit whatever range you want the "change bolding" to occur. So, simply refer to a range in the code where cells that must always remain bold are outside of the range you specify in the code.
As for the undo issue, you still will have the undo option available to you when you change a cell outside of the range specified in your code. So, when you need to undo, do you sometimes need to change a cell from bold to regular? We can toggle the cell, or make it regular (unbold) when the value is deleted (when it equals ""), or there is undo code that could be inserted too. What are the conditions or examples as to when you'd need to have something be not bold that was bolded due to the code? I'll be heading out now for the day, so I can help you on this post tonite if need be. Or, someone else may be able to help you in the meantime. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|