Selection hides when Excel lost focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a VB6 ActiveX Exe that displays a form. The form is called from a VBA
macro in Excel.

The problem I have is when the form is activated Excel lost focus
(obviously) but also the range the user has selected in a worksheet
disappears.

This is a problem and confusing for the user (did I select correct cells or
not?) since the user doesn't see the selection anymore when the VB6 form is
activated.

I've tried almost everything but can't get it to work.

Any suggestion will be appreciated.

Thanks in advance.

/Nicke
 
Nicke,
From what I see, the selection is lost when Excel is not the foreground
window. As such, and you have an out-of-process ActiveX.exe, this would seem
normal behaviour.
Maybe changing to an in-process ActiveX.dll would change this behaviour.

You could call .Copy before you switch the exe, as the marching ants remain
visible
Or inform users to look at the address combo box to the left of the formula
bar, which shows the address of the current Activecell.

NickHK
 
Hello NickHK,

Thanks for your answer, a dll solved the problem (why didn't I think of
that?!?!)

Anyway, you saved my day.
 

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

Back
Top