vidya lakshm
10-19-2010, 03:57 AM
Hi,
I have implemented & populated the dropdown using the below code,
Sub Drp1()
Dim lb
Dim rng
Set rng = Worksheets(ActiveSheet.Name).Range("A1")
Set lb = Worksheets(ActiveSheet.Name).DropDowns.Add(Left:=rng.Left, Top:=rng.Top, Width:=rng.Width, Height:=rng.Height, Editable:=False)
lb.AddItem "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
lb.AddItem "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
lb.AddItem "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
lb.Name = ActiveSheet.Name + "drp:" & 1
lb.OnAction = "DrpChange"
End Sub
Sub DrpChange()
MsgBox ("Hello")
End Sub
The problem that I am facing is , the entire contents is not visible.
How do i solve this problem without compromising on the look & feel of the sheet
Regards
Vidya
I have implemented & populated the dropdown using the below code,
Sub Drp1()
Dim lb
Dim rng
Set rng = Worksheets(ActiveSheet.Name).Range("A1")
Set lb = Worksheets(ActiveSheet.Name).DropDowns.Add(Left:=rng.Left, Top:=rng.Top, Width:=rng.Width, Height:=rng.Height, Editable:=False)
lb.AddItem "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
lb.AddItem "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
lb.AddItem "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
lb.Name = ActiveSheet.Name + "drp:" & 1
lb.OnAction = "DrpChange"
End Sub
Sub DrpChange()
MsgBox ("Hello")
End Sub
The problem that I am facing is , the entire contents is not visible.
How do i solve this problem without compromising on the look & feel of the sheet
Regards
Vidya