Devin
Board Regular
- Joined
- Jan 21, 2009
- Messages
- 105
Hey All,
I have recently started using the Watch Window a lot, and I as wondering if there is a way to retrieve data from the Watch Window. In the Object Browser, it looks like there are a few members of Watches (Add, Application, Count, Creator, Delete, Item, Parent). Is there a way to use "Item" to retrieve a watch? Or can I place the entire list on a regular sheet? Most of all, I'd like to be able to delete all watches belonging to a particular sheet.
Here is a sample of some of the code I have been using.
THANK YOU!!!
I have recently started using the Watch Window a lot, and I as wondering if there is a way to retrieve data from the Watch Window. In the Object Browser, it looks like there are a few members of Watches (Add, Application, Count, Creator, Delete, Item, Parent). Is there a way to use "Item" to retrieve a watch? Or can I place the entire list on a regular sheet? Most of all, I'd like to be able to delete all watches belonging to a particular sheet.
Here is a sample of some of the code I have been using.
Code:
Sub MyWatches()
If Application.Watches.Count = 0 Then GoTo NextStep
QuestionYN = MsgBox("Do you want to clear the existing Watch List?", vbYesNo)
If QuestionYN = vbYes Then
Application.Watches.Delete
End If
NextStep:
Application.Watches.Add ActiveWorkbook.ActiveSheet.Range("A1")
Application.CommandBars("Watch Window").Visible = True
End Sub
THANK YOU!!!
Last edited: