Sorry, I forgot to change my test sheet name (Sheet3) to your actual sheet name (). In the code below, you need to change the Sheet3 to your sheet's actual name.
[/CODE]Code:[CODE]Private Sub TextBox1_Change() Application.EnableEvents = False Sheets("[B][COLOR=#ff0000]Sheet3[/COLOR][/B]").TextBox1.Value = TextBox1.Value Application.EnableEvents = True End Sub
I just tried it following the steps you outlined above and it works perfectly for me. I am at a loss why it is not working correctly for you. Any chance you can post a copy of your workbook on DropBox so I can download it and try to see what the problem is?Right lets see if I understand as nothing is happening:
I have two sheets, one sheet (which is the source) called "Case Details" or Sheet2 with a textbox 1 and I have another sheet called "CI Report" with another texbox 1 where I want the text to appear.
I have double clicked the textbox1 on sheet"Case Details" in design mode and entered the code you provided as follows:
Private Sub TextBox1_Change()
Application.EnableEvents = False
Sheets("CI Report").TextBox1.Value = TextBox1.Value
Application.EnableEvents = True
End Sub
however nothing shows up on sheet "CI Report"
What am I missing here?
I just tried it following the steps you outlined above and it works perfectly for me. I am at a loss why it is not working correctly for you. Any chance you can post a copy of your workbook on DropBox so I can download it and try to see what the problem is?
I sent you an email (before Fluff removed your email address) received your file. To keep this thread complete, I am posting here what I emailed back to you after testing your file...Rick, This is my email. Please send me a reply email and I will email you the workbook. Much appreciated.
I am not sure what to tell you as the code is working fine for me here. When I open the file you sent me and type text into the "Summary of key Evidence" TextBox on the "Case Details" sheet, that same text shows right up in the "Summary of Key Evidence" TextBox on the "CI Report" sheet. In other words, the code, as is, works as expected for me. I cannot think of a reason why this is not working for you. Something you may try... open the file on a different computer and see if it works for you then... just as an experiment. Let me know if it works or not when you do that.
You have to unprotect the sheet before you can make any changes to it. The way you do that in your code is by putting this line of code any time before your code attempts to change the sheet...I get an error '1004' unable to set RowHeight property of the Range class. when I protected the sheet, can anyone tell me the way around this?
You have to unprotect the sheet before you can make any changes to it. The way you do that in your code is by putting this line of code any time before your code attempts to change the sheet...
Sheets("YourSheetName").Unprotect "Password if any"
Omit the password if the sheet's protection does not have one... specify the sheet's name where I have highlighted in blue
At the end of your code, you need to reapply the protection using this...
Sheets("YourSheetName").Protect "Password if any".
If you have applied any conditions to your protection, you need to specify them as well. You will have to see the help files for the Protect method in order to know where to specify them.
Rick. Much appreciated. It works perfectly!