Excel Event

Excel Event

Anonymous
Not applicable
271 Views
5 Replies
Message 1 of 6

Excel Event

Anonymous
Not applicable
I have a Excel table listing drawings, and I have added a Dwgthumbnail view, but
I am having trouble figuring out how to notice when a new cell has been selected
so I can update the dwgthumbnail with the drawing selected. I have looked
thru the Excel events but am not having much luck.

Any help appreciated.

--
Kent Keller
Strobe Data Inc.
www.strobedata.com
The optimist thinks this is the best of all possible worlds. The pessimist fears
it's true.
0 Likes
272 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi Kent,

Have you tried the "SelectionChange" event on the ACTIVE sheet?

I placed a msgbox in that event, and get the message after clicking in any
cell other than the active one.

Gary
0 Likes
Message 3 of 6

Anonymous
Not applicable
Gary

I figured you might respond 8)

Well I had found it in the help, but I had the code in the Sheet, and after your
post I moved it to the Workbook and it worked. I am not sure I understand when
and where to put things, but .... oh well, now I should be able to use this to
update the dwgthumbnail view 8) I had tried the VoloView, but it is to slow,
and I still get the issue of model space showing thru to paperspace with it.

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Excel.Range)
Application.StatusBar = Sh.Name & ":" & Target.Address
End Sub

--
Kent Keller
Strobe Data Inc.
www.strobedata.com
The optimist thinks this is the best of all possible worlds. The pessimist fears
it's true.

"Gary McMaster" wrote in message
news:ef25310.0@WebX.SaUCah8kaAW...
> Hi Kent,
>
> Have you tried the "SelectionChange" event on the ACTIVE sheet?
>
> I placed a msgbox in that event, and get the message after clicking in any
> cell other than the active one.
>
> Gary
>
0 Likes
Message 4 of 6

Anonymous
Not applicable
Kent Keller wrote:

> I have a Excel table listing drawings, and I have added a Dwgthumbnail view, but
> I am having trouble figuring out how to notice when a new cell has been selected
> so I can update the dwgthumbnail with the drawing selected. I have looked
> thru the Excel events but am not having much luck.

The Excel API is massive.

On a side note, have you found a way to 'bind' your graphic to a cell.
In other words if you delete a row, do the graphics shift up?

Terry
0 Likes
Message 5 of 6

Anonymous
Not applicable
Hi Terry

Wouldn't it be nice if we could just insert the control right in a cell?

To answer your question, no I haven't, but it is going to be a issue with me
also, but in a different way. I want the control to shift up or down depending
on which cell is active so it stays on the screen all the time.

In my case I haven't looked into it at all yet, but I was hoping there would be
a way to get the height of the rows and figure out where the top and left of the
control should be from that. It should be available to the API, since we can
get it by using the format .... rows .... height dialog.

Maybe if it is accessible you could watch for a row deletion or addition, and
then figure out the location of the row you want the control to stay with.

Does that make any sense, or am I fooling myself thinking it might be possible?

--
Kent Keller
Strobe Data Inc.
www.strobedata.com
The optimist thinks this is the best of all possible worlds. The pessimist fears
it's true.

"Terry W. Dotson" wrote in message
news:395270C2.B16F886E@dotsoft.com...
>
> The Excel API is massive.
>
> On a side note, have you found a way to 'bind' your graphic to a cell.
> In other words if you delete a row, do the graphics shift up?
>
> Terry
0 Likes
Message 6 of 6

Anonymous
Not applicable
Kent Keller wrote:

> To answer your question, no I haven't, but it is going to be a issue with me
> also, but in a different way. I want the control to shift up or down depending
> on which cell is active so it stays on the screen all the time.

I was dabbling with the possibility of graphics when I was doing the
Prop2XL Freebee. I hit the wall on the graphics and scrapped it. An
option you have on a freebee. Taking an entirely different approach
now.

Good Luck, Terry
0 Likes