View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Adding a scroll bar to a cell to scroll its contents.

This might be a very crude solution but maybe it would give you an idea.

Add a textbox to the worksheet and name it as TextBox1. Then paste this
code in the worksheet code module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Cells.Count 1 Then Exit Sub

TextBox1.Left = Target.Left
TextBox1.Top = Target.Top
TextBox1.Width = Target.Width
TextBox1.Height = Target.Height
TextBox1.MultiLine = True
TextBox1.ScrollBars = fmScrollBarsVertical
TextBox1.LinkedCell = Target.Address

End Sub





--
Hope that helps.

Vergel Adriano


"SkyKid" wrote:

Is that possible? I have many cells with a sepcific height. If the
contents of the cell exceed the height I would want a scrollbar to appear for
the cell....

Or does anyone have an alternative solution to this?