B
borjan
Recording a macro from a list is ok, but
how to assign the list to the macro?
how to assign the list to the macro?
Gord Dibben said:Now we're getting clearer.........I think<g>
This worksheet event code will change the text in a shape when choice is
made from a DV dropdown.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Vals As Range
Dim R As Range
Dim Rtext As String
Set R = Me.Range("A1") 'DV dropdown cell address
Set Vals = Me.Range("M1:M10")
'vals is source range for DV dropdown list and is Vlookup table range
If Intersect(Target, R) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
Rtext = Application.VLookup(R.Value, Vals, 1, False)
ActiveSheet.Shapes("AutoShape 1").Select
With Selection.Characters
.Text = Rtext
.Font.Size = 16 ' adjust or delete
End With
SendKeys "{ESC}"
endit:
Application.EnableEvents = True
End Sub
Paste into worksheet module.
Gord
.
If you want I can send you a sample workbook that works.
Either in 2007 or pre-2007.
Email me at gorddibbATshawDOTca
Change the obvious.
Gord