LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default UserForm with multiple selections

I use the code below to call a UserForm when I click on the appropriate
cell, and it works fine, but end users are never happy. They want to be able
to select either just one cell, say B5 or a combination of cells such as B5
E6 and H9 and have the UserForm data placed in all selected cells.

If I select only one cell everything is fine, the UserForm comes up, but if
I hold down the control key and select multiple cells the UserForm does not
come up. I can select the first cell, have the UserForm come up, move the
UserForm out of the way and then hold the control key and select the cells,
and then drag the UserForm back into place. But this is very cumbersome and
not popular with the end users.


Any ideas?


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)

If Union(Target, Range("B5:B10")).Address = Range("B5:B10").Address Then
EmployeeList.Show
If Union(Target, Range("E5:E10")).Address = Range("E5:E10").Address Then
EmployeeList.Show
If Union(Target, Range("H5:H10")).Address = Range("H5:H10").Address Then
EmployeeList.Show

If Union(Target, Range("B13:B19")).Address = Range("B13:B19").Address Then
EmployeeList.Show
If Union(Target, Range("E13:E19")).Address = Range("E13:E19").Address Then
EmployeeList.Show
If Union(Target, Range("H13:H19")).Address = Range("H13:H19").Address Then
EmployeeList.Show


End Sub


 
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
Creating Chart from Userform ListBox selections Corey Charts and Charting in Excel 2 September 8th 08 05:53 AM
Copy Multiple Selections dford Excel Discussion (Misc queries) 2 September 14th 07 07:07 AM
Multiple selections Confuddled User!!!!!!!!!!!!! Excel Discussion (Misc queries) 3 August 30th 07 08:56 PM
Creating Multiple GIFs from Multiple Range selections -- I need a volunteer to test my code to see why it fails Father Guido[_5_] Excel Programming 0 November 19th 05 08:52 AM
Multiple Selections in a Combo Box??? hce[_2_] Excel Programming 1 September 3rd 04 04:54 PM


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