Related:
- Change Event
- Change computer name cmd - Guide
- Change lg tv name - Guide
- Fortnite christmas event 2023 - Guide
- T-mobile change number - Guide
- How to change language in kmplayer - Guide
4 responses
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Jul 21, 2009 at 03:49 AM
Jul 21, 2009 at 03:49 AM
Hi Mike
Try this
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then Target.Font.ColorIndex = 5
End Sub
Try this
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then Target.Font.ColorIndex = 5
End Sub
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Jul 22, 2009 at 11:26 PM
Jul 22, 2009 at 11:26 PM
Hello Mike
You didnt tell me which cells have to be changed. From the macro code you put I inferred that you have to change the cell colour of Cell A5 of sheet1
If you have more cells add more lines in the strcuture
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then Target.Font.ColorIndex = 5
where you have to change the sheet name and cell address
if you want all cells to change color just put
Target.Font.ColorIndex = 5
You didnt tell me which cells have to be changed. From the macro code you put I inferred that you have to change the cell colour of Cell A5 of sheet1
If you have more cells add more lines in the strcuture
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then Target.Font.ColorIndex = 5
where you have to change the sheet name and cell address
if you want all cells to change color just put
Target.Font.ColorIndex = 5
Yes! That worked. OK 1 more thing. I want to run a macro when the cell is changed by another sheet. i.e. the cell is linked to another sheet and that is the sheet which is going to change the value. If I link it now and change the value of the target, the macro doesn't run.
Thanks in advance Excelguru.
Mike
Thanks in advance Excelguru.
Mike
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Jul 23, 2009 at 10:33 AM
Jul 23, 2009 at 10:33 AM
Hello Mike
Then use this
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then sheets("sheet2").range("f5").Font.ColorIndex = 5
Then use this
If Sh.Name = "Sheet1" And Target.Address = "$A$5" Then sheets("sheet2").range("f5").Font.ColorIndex = 5
OK That worked, but now I have another problem. The computer is hooked up to a scale which sends the weights to a default Excel workbook which is unusable for Production, so I linked another workbook to it so that the weights will appear there. The problem is that when the weights come over, they won't trigger the macro. Any ideas?
Thanks in advance Excelguru,
Mike
Thanks in advance Excelguru,
Mike
Jul 21, 2009 at 09:30 AM
I put in the macro that you sent me, but it does nothing. Do I have to enable it in some way?
Thanks,
Mike