Returning text using a formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

IS it possible to copy and paste text that is retuned by a vlookup? Can I
for instance set up a macro button to copy and paste the returned text into a
text box and not the formula itself?
Thanks,

Alan
 
Should be able to do it with a macro. What you want to copy is the cell's
..Value
This presumes something is in B3 and that the text box named 'Text Box 1'
already exists on the sheet.

Sub CopyTextToTextBox()
Dim myText As String

myText = Range("B3").Value
ActiveSheet.Shapes("Text Box 1").Select
Selection.Characters.Text = myText
Range("B3").Select ' to get away from text box

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top