Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default names on col 1

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default names on col 1

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
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
converting email address names in a range of cells to real names John Excel Worksheet Functions 1 May 19th 10 03:44 PM
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
Sorting and matching rows of names with Socials with master list and eliminating the extra names Giacomo Excel Worksheet Functions 1 March 10th 07 01:52 AM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM
Change names of files in a folder to match names in Excel Column saybut Excel Programming 4 February 9th 04 06:26 PM


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