Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
REPSOT?? Sub Worksheet_Change(ByVal Target As Range) Ed Davis[_2_] Excel Discussion (Misc queries) 14 October 13th 09 03:20 PM
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R Toppers Excel Discussion (Misc queries) 0 August 17th 07 02:02 AM
Control Toolbox and Private Sub Worksheet_Change(ByVal Target Toppers Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
Excel VBA .... Worksheet_Change(ByVal Target As Range) question Joseph Donnelly Excel Programming 2 May 17th 04 08:35 PM
Many Sub Worksheet_Change(ByVal Target As Range) In One Worksheet MathewPBennett Excel Programming 4 December 24th 03 01:01 PM


All times are GMT +1. The time now is 08:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"