![]() |
#1
|
|||
|
|||
![]()
I get a compile error in msword: method or data member not found
I tried checking the box for Excel Object Library in tools references but cannot debug code: Sub abc() Dim restart As Boolean restart = True While restart SendKeys "{NUMLOCK}{ADD}" Dim key As String key = "" While key = "" DoEvents If Application.CheckAbort = True Then Exit Sub If Not Application.CommandBars.GetPressedMso("FilePrint") Is Nothing Then Exit Sub key = Application.CommandBars.FindControl(ID:=30002).acc Child(1).Caption Wend If key = vbCr Then Call xyz restart = False ElseIf key = "{NUMLOCK}{ADD}" Then 'Do nothing, restart loop Else restart = False End If Wend End Sub Not sure how to fix the error. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile error -- incompatibility? | Ulodesk | Word VBA | 4 | 03-23-2023 12:12 PM |
compile error expected end sub | ashg75 | Word VBA | 2 | 07-13-2017 07:08 AM |
![]() |
ksigcajun | Word VBA | 2 | 04-08-2015 06:44 AM |
Compile error: sub or function not defined.. | xena2305 | Excel Programming | 0 | 08-02-2011 10:17 AM |
compile error in Word | raco | Word | 0 | 09-28-2010 12:40 PM |