PDA

View Full Version : Question on Target.Parent.Active



menor59
05-07-2013, 09:58 AM
This works great...


Target.Parent.Active



this is envoked because im running thru 9 sheets and need to return back to the original sheet...but how would i get back to the original cell on that target.Parent.Active sheet. startcell dosent work. Thoughts?

Paul_Hossler
05-07-2013, 02:17 PM
I'd just remember the ActiveCell, do the sheets, and return back to the save range


Option Explicit
Sub demo()
Dim ws As Worksheet
Dim r As Range

Set r = ActiveCell

MsgBox r.Parent.Name & " -- " & r.Address

For Each ws In ActiveWorkbook.Worksheets

ws.Select

MsgBox ActiveSheet.Name

Next

r.Parent.Select

r.Select
MsgBox ActiveSheet.Name & " -- " & ActiveCell.Address
End Sub


Paul