ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How find if target is object in Worksheet_Change (ByVal Target As.. ?) (https://www.excelbanter.com/excel-programming/303060-how-find-if-target-object-worksheet_change-byval-target.html)

Gunnar Johansson

How find if target is object in Worksheet_Change (ByVal Target As.. ?)
 
Hi,

A / I need to act different if the target of change is a checkbox or if it
is a range (or cell).

B / I also need to be able to separate what specific checkbox is changing. I
need to run different subroutines depending on which checkbox is changing.

Kan anyone give me a hint how to do this?

Regards
Gunnar



Bob Phillips[_6_]

How find if target is object in Worksheet_Change (ByVal Target As.. ?)
 
A checkbox doesn't trigger the Worksheet_Change event.

You need to identify this in the checkbox event or macro.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gunnar Johansson" wrote in message
...
Hi,

A / I need to act different if the target of change is a checkbox or if it
is a range (or cell).

B / I also need to be able to separate what specific checkbox is changing.

I
need to run different subroutines depending on which checkbox is changing.

Kan anyone give me a hint how to do this?

Regards
Gunnar





Gunnar Johansson

How find if target is object in Worksheet_Change (ByVal Target As.. ?)
 
Oh yes, thats right! - that explains why I used Worksheet_Calculate as
trigger today. Ít was a while since I wrote this code. I used the fact that
checking calculate a "false/true" information in a hidden cell.

I haven't worked with objects so much earlier, and need now even more help -
can I continue to use ws_Calculate or am I on the wrong road?

Grateful to any help

Regards
Gunnar

"Bob Phillips" skrev i meddelandet
...
A checkbox doesn't trigger the Worksheet_Change event.

You need to identify this in the checkbox event or macro.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gunnar Johansson" wrote in message
...
Hi,

A / I need to act different if the target of change is a checkbox or if

it
is a range (or cell).

B / I also need to be able to separate what specific checkbox is

changing.
I
need to run different subroutines depending on which checkbox is

changing.

Kan anyone give me a hint how to do this?

Regards
Gunnar







Bob Phillips[_6_]

How find if target is object in Worksheet_Change (ByVal Target As.. ?)
 
Gunnar,

I think you are on the wrong road. You can't use any worksheet event for
controls, as they are not part of worksheet, but on a separate virtual
layer.

Control toolbox controls have their own events (click, etc.), whereas Forms
controls are assigned macros. You need to work through these.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gunnar Johansson" wrote in message
...
Oh yes, thats right! - that explains why I used Worksheet_Calculate as
trigger today. Ít was a while since I wrote this code. I used the fact

that
checking calculate a "false/true" information in a hidden cell.

I haven't worked with objects so much earlier, and need now even more

help -
can I continue to use ws_Calculate or am I on the wrong road?

Grateful to any help

Regards
Gunnar

"Bob Phillips" skrev i meddelandet
...
A checkbox doesn't trigger the Worksheet_Change event.

You need to identify this in the checkbox event or macro.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gunnar Johansson" wrote in message
...
Hi,

A / I need to act different if the target of change is a checkbox or

if
it
is a range (or cell).

B / I also need to be able to separate what specific checkbox is

changing.
I
need to run different subroutines depending on which checkbox is

changing.

Kan anyone give me a hint how to do this?

Regards
Gunnar










All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com