Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Copying Text Box Content in VBA

  • This topic is locked This topic is locked



    New Member

  • Member
  • Pip
  • 2 posts
I am writing an Invoice system for a client in Excel and its VB. I have run across a problem:

The system needs to copy the content of one text box to another. It also needs to preserve the formatting e.g. the bit in bold. I have the code that copies the content across:

Sub Copy()
Worksheets("Invoice (2)").TextBoxes("P2 1").Text = Worksheets("Invoice").TextBoxes("P1 1").Text
End Sub

But the code does not copy the formatting. Could someone please provide me with an example of the could or a suggest on how this could be done.

I have also attached the Excel sheet as this may help solve the problem.

Thank you. Peter

PS. Does anyone know how to link text boxes in Excel e.g. when you have filled a text box with text it automatically carries on in a new text box.
  • 0




    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
http://www.geekstogo...s...=122564&hl= <--duplicate post
  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP