LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Selection.Item Query

Why do you build that formula manuall

sLeft = Selection.Item(1).Address
sRight = Selection.Item(Selection.Count).Address
iTotalcells = Selection.Count
sRange = sLeft + ":" + sRight

could be replaced with


sRange = Selection.Address

You are using a fairly advanced technique to break out information which you
reassemble back to the original information.

to further illustrate.

if selection.Areas.count = 1 then
yTop = selection(1).Row
xLeft = selection(1).coluimn
yBottom = selection(selection.count).Row
xRight = selection(selection.count).column
end if

--
Regards,
Tom Ogilvy


" wrote:

Thanks, that solved my problem.



 
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
Combobox item selection+pop up list N.F[_2_] Excel Programming 3 June 13th 07 10:53 PM
How to Auto-populate cell based on selection of a list item AK9955 Excel Discussion (Misc queries) 2 April 30th 07 10:04 AM
How do I make Microsoft Query a menu item? gff Excel Discussion (Misc queries) 0 May 6th 05 12:41 AM
data selection query no2 SS[_2_] Excel Programming 2 December 4th 03 07:27 PM


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

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

About Us

"It's about Microsoft Excel"