Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Display sum of selection with SelectionChange procedure

Hello,
I am trying to compose a Worksheet_SelectionChange Sub that will pop
up a display as soon as two or more cells (ALSO NON-CONTIGUOUS ONES
!!!) of a certain column are selected. This display should show the
sum of the selection and update it as more cells are selected.
I have tried this :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count < 2 Then Exit Sub
If Target.Column < 10 Then Exit Sub
MsgBox Application.Sum(Selection)
End Sub

which works fine but the ok button prevents selecting non-adjacent
cells unless you click it.
What I want is a display that continually updates untill I dismiss it.

Can you help me here?

And another question : how can I EDIT the contents of a message box?
I want the sum shown in 0.000,00 format, font size 12 and bold.

Thank you very much
Herman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Display sum of selection with SelectionChange procedure

Hi
before providing a solution: Why don't you use the information in the
taskbar. It does just exactly this?

--
Regards
Frank Kabel
Frankfurt, Germany

"Herman" schrieb im Newsbeitrag
m...
Hello,
I am trying to compose a Worksheet_SelectionChange Sub that will pop
up a display as soon as two or more cells (ALSO NON-CONTIGUOUS ONES
!!!) of a certain column are selected. This display should show the
sum of the selection and update it as more cells are selected.
I have tried this :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count < 2 Then Exit Sub
If Target.Column < 10 Then Exit Sub
MsgBox Application.Sum(Selection)
End Sub

which works fine but the ok button prevents selecting non-adjacent
cells unless you click it.
What I want is a display that continually updates untill I dismiss

it.

Can you help me here?

And another question : how can I EDIT the contents of a message box?
I want the sum shown in 0.000,00 format, font size 12 and bold.

Thank you very much
Herman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Display sum of selection with SelectionChange procedure

Oh! Frank, excuse me for this stupid question! I'm really embarassed.
Can you believe that I'v been a very intensive XL user for the last
five years and never noticed that little thing in the task bar.
Thanks anyway for your attention.
By the way, how about this EDITING a message box; can it be done ?
Herman
"Frank Kabel" wrote in message ...
Hi
before providing a solution: Why don't you use the information in the
taskbar. It does just exactly this?

--
Regards
Frank Kabel
Frankfurt, Germany

"Herman" schrieb im Newsbeitrag
m...
Hello,
I am trying to compose a Worksheet_SelectionChange Sub that will pop
up a display as soon as two or more cells (ALSO NON-CONTIGUOUS ONES
!!!) of a certain column are selected. This display should show the
sum of the selection and update it as more cells are selected.
I have tried this :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count < 2 Then Exit Sub
If Target.Column < 10 Then Exit Sub
MsgBox Application.Sum(Selection)
End Sub

which works fine but the ok button prevents selecting non-adjacent
cells unless you click it.
What I want is a display that continually updates untill I dismiss

it.

Can you help me here?

And another question : how can I EDIT the contents of a message box?
I want the sum shown in 0.000,00 format, font size 12 and bold.

Thank you very much
Herman

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Display sum of selection with SelectionChange procedure

Hi
what do you mean with Editing a messagebox?

Frank
P.S.: You also have different function in this taskbar. right-click
with your mouse on this filed :-))


--
Regards
Frank Kabel
Frankfurt, Germany


Herman wrote:
Oh! Frank, excuse me for this stupid question! I'm really embarassed.
Can you believe that I'v been a very intensive XL user for the last
five years and never noticed that little thing in the task bar.
Thanks anyway for your attention.
By the way, how about this EDITING a message box; can it be done ?
Herman
"Frank Kabel" wrote in message
...
Hi
before providing a solution: Why don't you use the information in

the
taskbar. It does just exactly this?

--
Regards
Frank Kabel
Frankfurt, Germany

"Herman" schrieb im Newsbeitrag
m...
Hello,
I am trying to compose a Worksheet_SelectionChange Sub that will

pop
up a display as soon as two or more cells (ALSO NON-CONTIGUOUS ONES
!!!) of a certain column are selected. This display should show

the
sum of the selection and update it as more cells are selected.
I have tried this :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count < 2 Then Exit Sub
If Target.Column < 10 Then Exit Sub
MsgBox Application.Sum(Selection)
End Sub

which works fine but the ok button prevents selecting non-adjacent
cells unless you click it.
What I want is a display that continually updates untill I dismiss

it.

Can you help me here?

And another question : how can I EDIT the contents of a message

box?
I want the sum shown in 0.000,00 format, font size 12 and bold.

Thank you very much
Herman


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
display list selection in a different cell notsomuchaguru Excel Discussion (Misc queries) 2 April 27th 10 06:51 PM
display filter selection from menu labgeek Excel Worksheet Functions 2 May 27th 09 04:52 PM
HELP! selection box to display charts Cam Excel Worksheet Functions 0 June 13th 08 09:41 PM
SelectionChange Event Squid[_3_] Excel Programming 5 February 11th 04 01:57 PM


All times are GMT +1. The time now is 10:36 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"