Monday, August 1, 2011

Add data to Text Box from a cell Value

If you want to add the content of any cell to the text box or shape in excel. Snapshot below



Here is the code-



Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 1 Then
Shapes("Rectangle 1").TextFrame.Characters.Text = Target.Value
End If
End Sub

Excel Macro FILE-

http://www.filefactory.com/file/cdbf6b4/n/Add_content_to_text_box.xlsm

No comments:

Post a Comment

Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...