![]() |
#1
|
|||
|
|||
![]()
Hi,
I created userform which gives users ability to select one number from 1 to 10. After user clicks OK button, the number that he chose should be entered into the Textbox which is in the word document. This is the code that I'm using: Code:
Private Sub CommandButton1_Click() Dim oShape As Word.InlineShape For Each oShape In ThisDocument.InlineShapes If oShape.OLEFormat.Object.Name = "LabelA" Then oShape.OLEFormat.Object.Caption = TextBox1.Value End If Next oShape UserForm2.hide End Sub |
#2
|
||||
|
||||
![]()
Hi Waldux,
an InLineShape's '.OLEFormat.Object' property has no 'Name' or 'Caption' sub-property. Hence the error. I would therefore be surprised if the code as posted ever worked.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Visual Basic error - run time error 504 | crazymorton | Word | 11 | 01-13-2012 04:32 AM |
Runtime error 5487 - Word cannot complete the save to to file permission error | franferns | Word | 0 | 11-25-2009 05:35 AM |
Receive error cannot open this form because an error occurred in BCM 2007 | bornhusker | Outlook | 0 | 06-01-2009 10:28 AM |
![]() |
markjean | Office | 1 | 12-06-2005 02:15 AM |
Installing Access Runtime | ziggy0508 | Office | 1 | 09-29-2005 04:21 PM |