Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-31-2011, 04:15 AM
SaneMan SaneMan is offline Setting focus to specific word document from UserForm Windows 98/ME Setting focus to specific word document from UserForm Office 2003
Novice
Setting focus to specific word document from UserForm
 
Join Date: Jan 2011
Posts: 20
SaneMan is on a distinguished road
Default Setting focus to specific word document from UserForm

Hello



I am having some trouble with the set focus command from my userform. This userform is going to be used by a number of people in my office. They are filling in the text boxes on the userform and after they press 'ok' this pastes the values as variables into a word document the form comes from which has a list of all the different letters/correspondence we use.

At the moment when the user clicks 'ok' it sets the focus to the active document and then pastes the variables in. This works fine as long as there are no other word documents open as the active document is the word document the form comes from. However, the problem is encountered when another word document is running at the same time as it tries to paste the variables into the other word document.

I'm sure there's a way of setting the focus to a specific word document by stating the document's title somewhere in the Macro. However, even this would not be enough as the user will be naming the original word document with a specific reference number each time!

Is there any other way around this? Is there a way of setting the focus to the document that the form comes from? Or a way of making the word document a variable so the form always knows to paste the fields into this one document?

I know there's a way round it but I'm not smart enough to figure it out it seems!

Thanks a lot.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook userform validation help aiwnjoo Outlook 0 12-08-2010 12:57 AM
Setting focus to specific word document from UserForm 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft