ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   forgotten object (https://www.excelbanter.com/excel-programming/355476-forgotten-object.html)

SP[_6_]

forgotten object
 
Private Sub Worksheet_Change(ByVal Datarget As Range)
Datarget.Font.ColorIndex = 5
End Sub
=====================
Hi

At one time, I must have gotten this code in the VBAProject | Microsoft
Excel Objects | This Workbook.

I'm trying to figure where I can find Datarget.

Please advise.
Thanks
Steve




Doug Glancy

forgotten object
 
Steve,

This line of code might work and tell you the sheet that the range is on.

msgbox Datarget.parent.name

hth,

Doug

"SP" wrote in message
...
Private Sub Worksheet_Change(ByVal Datarget As Range)
Datarget.Font.ColorIndex = 5
End Sub
=====================
Hi

At one time, I must have gotten this code in the VBAProject | Microsoft
Excel Objects | This Workbook.

I'm trying to figure where I can find Datarget.

Please advise.
Thanks
Steve







All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com