Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default treeView -- multiple selection

How do you set up a treeView control for multiple selection (i.e., select
multiple files with <Shift or <Ctll)? This

sub UserForm_Initialize()
......
tvFiles.SingleSel = False
.......

doesn't work (clicking on a new item clears the previous selection).

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default treeView -- multiple selection

This link will give you a description of the SingleSel property:

http://msdn.microsoft.com/library/de...elproperty.asp

Here is an example of using the TreeView control:

http://puremis.net/excel/code/080.shtml

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"julio" wrote in message
...
How do you set up a treeView control for multiple selection (i.e., select
multiple files with <Shift or <Ctll)? This

sub UserForm_Initialize()
......
tvFiles.SingleSel = False
.......

doesn't work (clicking on a new item clears the previous selection).

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default treeView -- multiple selection

Either I'm missing something, or the example in puremis doesn't allow you to
select more than one item at a time.
JK

"Damon Longworth" wrote:

This link will give you a description of the SingleSel property:

http://msdn.microsoft.com/library/de...elproperty.asp

Here is an example of using the TreeView control:

http://puremis.net/excel/code/080.shtml

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"julio" wrote in message
...
How do you set up a treeView control for multiple selection (i.e., select
multiple files with <Shift or <Ctll)? This

sub UserForm_Initialize()
......
tvFiles.SingleSel = False
.......

doesn't work (clicking on a new item clears the previous selection).

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default treeView -- multiple selection


Hello Julio , Hello Damon

you could add checkboxes in your TreeView

TreeView1.CheckBoxes = True


and if you want to have informations about checked lines

Private Sub CommandButton3_Click()
Dim NodX As Node

For Each NodX In TreeView1.Nodes
If NodX.Checked = True Then MsgBox NodX.Text
Next

End Sub



regards
michel


--
michelxld
------------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=382208

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default treeView -- multiple selection

Hi Julio,

How do you set up a treeView control for multiple selection (i.e., select
multiple files with <Shift or <Ctll)? This


I'm not sure about using ctrl to multi-select, but you could set the
CheckBoxes option on, so each node gets a check box that can be ticked.

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default treeView -- multiple selection

Hi Stephen,

to put it more clearly, I need the functionality of the usual Windows Open
File screen, where you can <Shift-Click to select a number of files to open.
This can't be mimicked with check boxes if you have more than a handful of
filenames.

Thanks


"Stephen Bullen" wrote:

Hi Julio,

How do you set up a treeView control for multiple selection (i.e., select
multiple files with <Shift or <Ctll)? This


I'm not sure about using ctrl to multi-select, but you could set the
CheckBoxes option on, so each node gets a check box that can be ticked.

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default treeView -- multiple selection

Hi Julio,

to put it more clearly, I need the functionality of the usual Windows Open
File screen, where you can <Shift-Click to select a number of files to open.
This can't be mimicked with check boxes if you have more than a handful of
filenames.


Well, I've never seen a Windows TreeView with that possibility. They're usually
used to select single nodes, with a list to show (and multi-select among) the
contents.

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev


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
multiple selection AND Excel Discussion (Misc queries) 9 February 13th 09 07:40 PM
multiple selection.... AND Excel Worksheet Functions 1 February 13th 09 12:35 AM
selection bug treeview RB Smissaert Excel Programming 0 March 23rd 05 12:08 AM
Multiple row selection Minh Excel Programming 1 September 1st 04 01:41 AM
multiple selection Michalll Excel Programming 3 December 3rd 03 12:58 AM


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