View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default easy question : textbox

Hi
use the selection_change event (event procedures: see:
http://cpearson.com/excel/events.htm). In your case try:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim res
If Intersect(Target, Me.Range("B3")) Is Nothing Then Exit Sub
Application.EnableEvents = False
res = InputBox("Enter a value")
Target.Value = res
Application.EnableEvents = True
End Sub

Put this in your worksheet module (not in a standard module)


--
Regards
Frank Kabel
Frankfurt, Germany


Got it.... now i can make it appear wenever i open or close a
worksheet... but i would like to make it appear wenever i select a
specific cell in the sheet... let say h3 ...

how can i do that ? there must be a way but my vb programming is soo
far away.....

thanks for the previous answer and thank ahead for the next answer

;-)

PS: oh ! and tom you can post your answer only one time it enough :-)
just kidding..... thank it was of great help


---
Message posted from http://www.ExcelForum.com/