justanotheruser
Board Regular
- Joined
- Aug 14, 2010
- Messages
- 96
Hi guys,
I've got the following macro:
Which basically when executed, from the first line of code copies the contents of TextBox1 in the VAT sheet to TextBox 2 on the Del 1 sheet. This applies for the other 3 lines for the named sheets too. Currently, to run the macro this has to be done by executing it, but is it possible to make it work dynamically or perhaps not even need a macro at all if I can make TextBox 2 = TextBox 1 somehow? I've heard about something called Private Subs - but I don't know if that's what I need?
Thanks in advance!
I've got the following macro:
Code:
Sub UpdateDelivery()
Sheets("Del1").Shapes("TextBox 2").TextFrame.Characters.Text = Sheets("VAT").Shapes("TextBox 1").TextFrame.Characters.Text
Sheets("Del2").Shapes("TextBox 2").TextFrame.Characters.Text = Sheets("VAT & Disc").Shapes("TextBox 1").TextFrame.Characters.Text
Sheets("Del3").Shapes("TextBox 2").TextFrame.Characters.Text = Sheets("Zero VAT").Shapes("TextBox 1").TextFrame.Characters.Text
Sheets("Del4").Shapes("TextBox 2").TextFrame.Characters.Text = Sheets("Zero VAT & Disc").Shapes("TextBox 1").TextFrame.Characters.Text
End Sub
Which basically when executed, from the first line of code copies the contents of TextBox1 in the VAT sheet to TextBox 2 on the Del 1 sheet. This applies for the other 3 lines for the named sheets too. Currently, to run the macro this has to be done by executing it, but is it possible to make it work dynamically or perhaps not even need a macro at all if I can make TextBox 2 = TextBox 1 somehow? I've heard about something called Private Subs - but I don't know if that's what I need?
Thanks in advance!