Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
to add to Jim's code, and to answer your third question, assume you
have a second spreadsheet named "Ump"........... Option Explicit Sub WhereAmI() Dim Writeme As Range Dim Whereme As Worksheet Set Whereme = ActiveWorkbook.Worksheets("Imp") Set Writeme = Whereme.Range("D1") Writeme.Value = "Hello world!" Set Writeme = Writeme.Offset(1, 0) Writeme.Value = "Hello universe!" Set Whereme = ActiveWorkbook.Worksheets("Ump") Set Writeme = Whereme.Range("D2") Writeme.Value = "Where am I?" Set Writeme = Writeme.Offset(2, 0) Writeme.Value = "Over here!" End Sub hope that helps you see how you can "move" around without activating & selecting. :) susan On Aug 11, 1:15*pm, "Jim Cone" wrote: Sub WhereAmI() * Dim Writeme As Range * Set Writeme = ActiveCell * MsgBox (Writeme.Address) * Set Writeme = Writeme.Offset(1, 0) * MsgBox (Writeme.Address) End Sub -- Jim Cone Portland, Oregon *USA "Hydra" wrote in .... (snipped) What am I doing wrong here? How can I increment a range adress? How can I increment a range adress on a worksheet that is not active? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell increment range | Excel Programming | |||
Auto increment chart range montly | Charts and Charting in Excel | |||
how to auto increment cell location within formula | Excel Worksheet Functions | |||
Increment array range | Excel Programming | |||
Increment cells only in filtered range? | Excel Programming |