Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible to change the activecell???
I have a function which analyzes the active cell, offsets it by one, and
loops this way until it find an empty cell. Its my version of finding the end of a contiguous range. It work well in almost every condition, but it appears that when it is called from a particular function, the activecell cannot be offset. The calling code does nothing more then call the function, just like any other function Does anyone know of a condition where the activecell is locked? THIS IS THE CALLING FUNCTION Private Sub ListOfRepsBox_Click() UpdateStores If Me.MultiPage1.Value = 1 Then Me.StoreEntry.SetFocus End Sub THIS IS THE LOOP ElseIf Selection = "col" Then Do While Not IsEmpty(ActiveCell) ActiveCell.Offset(NextCell, 0).Select Count = Count + 1 Loop If Count 1 Then ActiveCell.Offset(-1, 0).Select End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
impossible to change the activecell???
Finding the end of a continuous renage is a hell of a lot
easier and faster by using: Selection.End(xlToRight).Select or xlTo Left, xlUp, xlDown... Give it a shot. Nikos Y. (nyannaco at in dot gr) -----Original Message----- I have a function which analyzes the active cell, offsets it by one, and loops this way until it find an empty cell. Its my version of finding the end of a contiguous range. It work well in almost every condition, but it appears that when it is called from a particular function, the activecell cannot be offset. The calling code does nothing more then call the function, just like any other function Does anyone know of a condition where the activecell is locked? THIS IS THE CALLING FUNCTION Private Sub ListOfRepsBox_Click() UpdateStores If Me.MultiPage1.Value = 1 Then Me.StoreEntry.SetFocus End Sub THIS IS THE LOOP ElseIf Selection = "col" Then Do While Not IsEmpty(ActiveCell) ActiveCell.Offset(NextCell, 0).Select Count = Count + 1 Loop If Count 1 Then ActiveCell.Offset(-1, 0).Select End If . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
next to impossible | Excel Worksheet Functions | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
Am I trying the impossible? | Excel Discussion (Misc queries) | |||
chart MAcro to change on activecell | Excel Discussion (Misc queries) | |||
code to change activecell | Excel Programming |