R
ruyasan
I'm having a lot of trouble finding a solution to my problem becaus
even though there are great resources around for Excel programing an
Map Point programing, there is almost nothing about useing the
together.
Having said that, I assume that what I describe below happens with an
complex Active X control so perhaps somebody here can help me.
Basically I have a map point control embedded into excel. The proble
is that once the controll is accessed in any way from VBA, excel seem
to "lose focus" and a lot of its features become unavailable.
Its a little hard to explain, but I shall try to illustrate what i
happeing:
1. I open up my spreadsheet (with the embedded MPControl) and excel i
fully functional
2. I hit a button which uses the map point control to calculate a ma
point route (for those unfamiliar with map point - all that matter
here is that I accessed an Active X Control from VBA in this step)
3. Excel is no longer fully functional. I can still edit the content
of cells but nothing much else works (for example, Validation an
Format Cell are grayed out in all the menues - as well as any othe
functions which affect the way cells work)
4. I found out that if I select something within the embedded control
(like a city name) and then select something back inside th
spreadsheet (like some cell) then everything returns to normal
The problem is that I cannot replicate step 4 programatically.
For instance, I have some code that does this at the end of my rout
calculation function:
locPickUp.Select
wksDispatch.Range("A1").Select
This does not return excel to normal functionality (even though if
physically select something in the MPControl and then a cell everythin
is back to normal). This is a BIG problem for me because I have
function which ads special validation requirements to a cell based o
data returned from the MPControl. Since the validation functionality o
excel turns off as soon as the map point control is accessed, th
program crashed with the message:
"Automation Error:
The object involved has disconnected from its clients."
It seems as though as soon as objects within the map point control ar
accessed, a bunch of objects within excel's object tree disapear fo
that while. So, how do I make them come back?
I'm really REALLY stuck on this - so any help would be infinatel
apretiated
even though there are great resources around for Excel programing an
Map Point programing, there is almost nothing about useing the
together.
Having said that, I assume that what I describe below happens with an
complex Active X control so perhaps somebody here can help me.
Basically I have a map point control embedded into excel. The proble
is that once the controll is accessed in any way from VBA, excel seem
to "lose focus" and a lot of its features become unavailable.
Its a little hard to explain, but I shall try to illustrate what i
happeing:
1. I open up my spreadsheet (with the embedded MPControl) and excel i
fully functional
2. I hit a button which uses the map point control to calculate a ma
point route (for those unfamiliar with map point - all that matter
here is that I accessed an Active X Control from VBA in this step)
3. Excel is no longer fully functional. I can still edit the content
of cells but nothing much else works (for example, Validation an
Format Cell are grayed out in all the menues - as well as any othe
functions which affect the way cells work)
4. I found out that if I select something within the embedded control
(like a city name) and then select something back inside th
spreadsheet (like some cell) then everything returns to normal
The problem is that I cannot replicate step 4 programatically.
For instance, I have some code that does this at the end of my rout
calculation function:
locPickUp.Select
wksDispatch.Range("A1").Select
This does not return excel to normal functionality (even though if
physically select something in the MPControl and then a cell everythin
is back to normal). This is a BIG problem for me because I have
function which ads special validation requirements to a cell based o
data returned from the MPControl. Since the validation functionality o
excel turns off as soon as the map point control is accessed, th
program crashed with the message:
"Automation Error:
The object involved has disconnected from its clients."
It seems as though as soon as objects within the map point control ar
accessed, a bunch of objects within excel's object tree disapear fo
that while. So, how do I make them come back?
I'm really REALLY stuck on this - so any help would be infinatel
apretiated