#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum Visible


I have an addin which has a menu item calling a procedure summing al
visible cells in a selection.

I am having problems setting the range/selection to be active withi
the proc.

Dim sum_range As Object
Set sum_range = Selection
MsgBox sum_range.Column.Count

Does anyone have any ideas

--
MattShoreso
-----------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347
View this thread: http://www.excelforum.com/showthread.php?threadid=32035

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum Visible


It's ok.

Was using column instead of columnS!!!!

--
MattShoreso
-----------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347
View this thread: http://www.excelforum.com/showthread.php?threadid=32035

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Sum Visible

Hi Matt

Sub test()
Dim sum_range As Range
Set sum_range = Selection.SpecialCells(xlCellTypeVisible)
MsgBox Application.Sum(sum_range)
End Sub

HTH. Best wishes Harald

"MattShoreson" skrev i melding
...

I have an addin which has a menu item calling a procedure summing all
visible cells in a selection.

I am having problems setting the range/selection to be active within
the proc.

Dim sum_range As Object
Set sum_range = Selection
MsgBox sum_range.Column.Count

Does anyone have any ideas?


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile:

http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=320353



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
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM
Toggle text to be visible and not visible Dave Y[_3_] Excel Programming 3 January 10th 04 07:27 PM
Toggle Text to be visible and Not visible Dave Y[_3_] Excel Programming 1 January 10th 04 07:16 PM
Toggle Text in a column to be visible or not visible Dave Y[_3_] Excel Programming 4 January 8th 04 08:46 PM
Help: Copying Visible Cells only to Visible cells! Jay Jayakumar Excel Programming 0 July 9th 03 08:25 PM


All times are GMT +1. The time now is 10:48 AM.

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"