Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Copying Text Box Content in VBA


  • This topic is locked This topic is locked

#1
annannienann

annannienann

    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

Advertisements


#2
dsenette

dsenette

    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