Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default More on text in Comment Boxes.........

Mike H replied with the code below on 09.07 in answer to my question.

This works perfectly on a spreadsheet where you are entering the vlaues in
cells A1 & A2.

In my spreadsheet the results in cells A1 & A2 are as a result of a lookup
table after the user has selected from a list.

I am trying to return the values of cells A1 & A2 in a Comments box in for
example cell C1.

Thanks once again.

Steve



Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default More on text in Comment Boxes.........

Does this do what you want?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2").Precedents) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub

Rick


"Steve Jones" wrote in message
...
Mike H replied with the code below on 09.07 in answer to my question.

This works perfectly on a spreadsheet where you are entering the vlaues in
cells A1 & A2.

In my spreadsheet the results in cells A1 & A2 are as a result of a lookup
table after the user has selected from a list.

I am trying to return the values of cells A1 & A2 in a Comments box in for
example cell C1.

Thanks once again.

Steve



Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default More on text in Comment Boxes.........


Thanks Rick - Excellent!

"Rick Rothstein (MVP - VB)" wrote in
message ...
Does this do what you want?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2").Precedents) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub

Rick


"Steve Jones" wrote in message
...
Mike H replied with the code below on 09.07 in answer to my question.

This works perfectly on a spreadsheet where you are entering the vlaues
in
cells A1 & A2.

In my spreadsheet the results in cells A1 & A2 are as a result of a
lookup
table after the user has selected from a list.

I am trying to return the values of cells A1 & A2 in a Comments box in
for
example cell C1.

Thanks once again.

Steve



Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub






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
Excel spreadsheet comment boxes keep shrinking smaller than text. TM Excel Worksheet Functions 5 January 4th 08 07:19 AM
pictures in comment boxes? Excel_ing for Greatness Excel Discussion (Misc queries) 2 June 13th 07 11:24 PM
Comment Boxes RWS Excel Discussion (Misc queries) 1 November 3rd 05 02:26 PM
Comment Boxes Steved Excel Worksheet Functions 2 January 25th 05 10:55 PM
comment boxes w-domo Excel Discussion (Misc queries) 1 January 21st 05 02:30 PM


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