Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please help. I have all the names of my students on column A. Let say A1 is
Sam. A2 is Peter. If I scroll right and click on QA1, I want to see the name of Sam on a userform1.caption. If I click on M100, I want to see the A100 student's name on userform1.caption. It seems like there is something to do with target but I just can't make it work with my limited programming knowledge. Thanks for your help in advance. Boogie |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right click on the sheet tab, Select View Code and paste in this code.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) if target.count 1 then exit sub if Target.column 1 then Userform1.Caption = Cells(target.row,1).Value Userform1.Show End if End Sub -- Regards, Tom Ogilvy "boogie" wrote in message ... Please help. I have all the names of my students on column A. Let say A1 is Sam. A2 is Peter. If I scroll right and click on QA1, I want to see the name of Sam on a userform1.caption. If I click on M100, I want to see the A100 student's name on userform1.caption. It seems like there is something to do with target but I just can't make it work with my limited programming knowledge. Thanks for your help in advance. Boogie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting email address names in a range of cells to real names | Excel Worksheet Functions | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
Sorting and matching rows of names with Socials with master list and eliminating the extra names | Excel Worksheet Functions | |||
return all worksheet tab names and chart sheet tab names in report - an example | Excel Programming | |||
Change names of files in a folder to match names in Excel Column | Excel Programming |