Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Microsoft Office
Developer Automation
Filling Userform in Word with Excel cell value.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Ken Laws [MSFT], post: 6905660"] Hi Alan, The 438 error is being generated because "UserForm" is not a property or method of Microsoft Word's document object. To set the value of a userform's text box from automation I would suggest the following solution. 1. Add a module to the Word document and then add a subroutine similar to the code below. Sub ShowForm(s As String) frmCSS.txtCostNon.Value = s frmCSS.Show End Sub 2. From your VBA code in Excel execute the a line of code similar to the following once the Word document is open. WordApp.Run "ShowForm",Worksheets("Sheet1").Cells(25, 5).Value where WordApp is the Microsoft Word application variable. I hope this helps! If you have any questions please let me know via the posting. Regards, Ken Laws Microsoft Support This posting is provided "AS IS" with no warranties, and confers no rights. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Microsoft Office
Developer Automation
Filling Userform in Word with Excel cell value.
Top