![]() |
|
#2
|
||||
|
||||
|
Hi SaneMan,
Assuming your Userform is supposed to update its own document only, the simple solution is to use 'ThisDocument' instead of 'ActiveDocument'. Alternatively, you could set a reference to the document when the UserForm is first opened, then use that for subsequent updates. For example: Code:
Option Explicit Dim DocFrm As Document Private Sub UserForm_Initialize() Set DocFrm = ThisDocument End Sub Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) With DocFrm 'code to update the document goes here End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook userform validation help | aiwnjoo | Outlook | 0 | 12-08-2010 12:57 AM |
Checkbox on Userform result in Text in Word
|
Dolfie_twee | Word VBA | 1 | 06-22-2010 07:54 AM |
| Create Hyperlinks from Word to specific location in PDF | sukanyae | Word | 0 | 02-25-2010 04:08 PM |
| Help with forms (shifting focus) | jrh312 | Word | 0 | 11-19-2009 12:59 PM |
| [Word 2003] Macro's and a UserForm | xanuex | Word VBA | 0 | 10-19-2009 05:42 AM |