![]() |
Selection hides when Excel lost focus
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 |
Selection hides when Excel lost focus
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 "Nicke" wrote in message ... 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 |
Selection hides when Excel lost focus
Hello NickHK,
Thanks for your answer, a dll solved the problem (why didn't I think of that?!?!) Anyway, you saved my day. "NickHK" wrote: 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 "Nicke" wrote in message ... 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 |
All times are GMT +1. The time now is 07:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com