Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Show input box with cell value

Hi

I have a spreadsheet with some text in it, and I do not want to
increase the cell size to display it. Is there a way I can write a
macro to display the cell value on an input box (like in data
validation), when there is focus on the cell?

I have been able to do this for only one cell, but it has a range
reference to it - how do i refer to the cells own value, to display it
on the input box?


Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 206
Default Show input box with cell value

Paste this code into your worksheet module,it will create a comment box
with A1 text,
So whenever you focus on A1 the comment box will pop up showing you
what is in it


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1").ClearComments

Range("A1").AddComment
Range("A1").Comment.Visible = False
Range("A1").Comment.Text Text:=Range("A1").Text

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Show input box with cell value

Thanks,

Is there a way I can do this for multiple cells in one go?

I have a column of say - a 100 items I want this done for...

Sunil

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 156
Default Show input box with cell value

This will add comments to cells A1 to A100

Sub AddComment()
Dim i As Integer
For i = 1 To 100
With Cells(i, 1)
.ClearContents
.AddComment
.Comment.Visible = False
.Comment.Text Text:=Cells(i, 1).Text
End With
End Sub


Sandy

wrote:
Thanks,

Is there a way I can do this for multiple cells in one go?

I have a column of say - a 100 items I want this done for...

Sunil


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 156
Default Show input box with cell value

This will add comments to cells A1 to A100

Sub AddComment()
Dim i As Integer
For i = 1 To 100
With Cells(i, 1)
.ClearComments
.AddComment
.Comment.Visible = False
.Comment.Text Text:=Cells(i, 1).Text
End With
End Sub


Sandy

wrote:
Thanks,

Is there a way I can do this for multiple cells in one go?

I have a column of say - a 100 items I want this done for...

Sunil




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
Multi line merged cell - adapting to different size input - possible? David Smithz Excel Discussion (Misc queries) 1 June 18th 06 04:21 PM
=IF cell needs to show blank if blank Boethius1 Excel Discussion (Misc queries) 5 March 1st 06 05:36 PM
Want #VALUE! to show as blank cell JoeyW Excel Worksheet Functions 2 November 4th 05 09:24 AM
How do I change the format of a cell based on what I input? Husker87 Excel Worksheet Functions 8 August 19th 05 10:45 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 07:30 PM.

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"