View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 109
Default Trouble with Focus

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

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




"Alex@JPCS" wrote in message ...
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