turning off select

N

Norman Jones

Hi Bobby,
Hi, is it possible to turn off the select(cursor) cells with VBA code?

Your question is unclear - please could you expand on your requirements?
 
K

Ken Johnson

Bobby said:
Hi, is it possible to turn off the select(cursor) cells with VBA code?
Thank's ahead

Hi Bobby,

If all you are wanting to do is just deselect a particular range then
just select a different range. For example if the current selection is
Range("B1:B5") then...

Range("A1").Select

is just one example of VBA code that will achieve the required
deselection.

Ken Johnson
 
K

Ken Johnson

Norman said:
And if Ken's interpretation is correct, perhaps try:

Selection(1).Select


Hi Norman,

That's a new one for me.

Can you explain this use of selection?

Help wasn't too useful.

Ken Johnson
 
N

Norman Jones

Hi Ken,
That's a new one for me.

Can you explain this use of selection?

I took my cue from you:

As you know, I has some difficulty in deciphering the OP's requirements;
adopting your interpretation of a multiple cell selection, my suugestion
moves the selection from the range to a single cell.

In the case of your example (Range("B1:B5"), the resultant selection would
become B1.
 
K

Ken Johnson

Norman said:
In the case of your example (Range("B1:B5"), the resultant selection would
become B1.
Thanks Norman, it all makes sense now, Selection(2).Select results in
B2 being selected, etc.
It's nice to know this little things.

Ken Johnson
 
B

Bob Phillips

Could simply do Activecell.Select then, might be more logical than just the
first cell in range (then again, might not <g>).

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
N

Norman Jones

Hi Bob,
Could simply do Activecell.Select then, might be more logical than just
the
first cell in range (then again, might not <g>).

I could see an arguable case for either suggestion.

That said, I would suggest that the OP render the choice immaterial by
endeavouring to avoid the initial selection.
 
B

Bobby

Norman said:
Hi Bob,


I could see an arguable case for either suggestion.

That said, I would suggest that the OP render the choice immaterial by
endeavouring to avoid the initial selection.
Sorry if my question was not clear!
Ok, here is an example: If you open a new blank sheet you can
visualize by default the position of the current editable cell. In my
example the Excel selection is "A1" location cell. My question is, is
it possible to turn off(with a VBA command) the cell selection use by
default by EXCEL?(In my case "A1"cell. No square around no cell!).
 
B

Bob Phillips

Beats me why you would want to do this, but try

Sub RemoveFocus()
Dim oShape As Shape
For Each oShape In ActiveSheet.Rectangles
If Left(oShape.Name, 8) = "__Focus_" Then
oShape.Delete
End If
Next oShape
Set oShape = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 20, 20, 20,
20)
oShape.Name = "__Focus_" & Format(Now, "yyyymmddhhmmss")
oShape.Select
oShape.Visible = False
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
N

Norman Jones

Hi Bobby,
My question is, is
it possible to turn off(with a VBA command) the cell selection use by
default by EXCEL?(In my case "A1"cell. No square around no cell!).

No, a worksheet cell or range will always be selected. Suggestions have been
made, in response to similar such questions, to insert an invisible shape
and select the shape. However, unless you have an overriding reason to
disgiuse the selection, I would not advocate that you pursue that.
 
Top