Trouble with Focus

A

Alex@JPCS

Hi,

I'm struggling with a sheet which has a selected row (which I want to
maintain for user visibility).

When the user selects a textbox control on the worksheet (configured to work
like a button using mousedown event), I wish it to perform a function, but
to maintain the row selection on the sheet after it has completed.

It seems that event with all the other functions disabled, selecting the
worksheet control causes a change in focus from the worksheet, and the range
selection is lost. (An cannot be reset without returning the focus to the
worksheet first?

Any help would be appreciated.
XL2000 on Windows 2000 Pro

Regards,

Alex@JPCS
 
B

BrianB

Sub test()
Dim MyRange As Range
Set MyRange = Selection
'- run code
MyRange.Select
End Sub

Regards
BrianB
=====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top