Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2017, 06:51 AM
eduzs eduzs is offline Why vba code stops working after a document open command? Windows 10 Why vba code stops working after a document open command? Office 2010 32bit
Expert
Why vba code stops working after a document open command?
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default Why vba code stops working after a document open command?

I have this simple code:



Code:
Option Explicit

Global GlobDoc As Document

Sub Call_Autotexto()

Dim AppDoc2 As Document

Set GlobDoc = ActiveDocument

Set AppDoc2 = Documents.Open("E:\X\_AutoTexto.docm", Visible:=False)
Set AppDoc2 = Nothing

MsgBox "oi"

GlobDoc.Activate

End Sub
The "AutoTexto" have some complex vba code that runs and closes itself, but there's no "Oi" msgbox.

The code after documents open seems not working.

Any ideas?

Thanks.
__________________
Backup your original file before doing any modification.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why vba code stops working after a document open command? Drag and Drop Stops Working TucsonJack Word 7 04-26-2023 04:36 PM
Why vba code stops working after a document open command? when using find in vba several times it stops working Salah Word VBA 1 03-02-2017 03:02 AM
Outlook Stops Working TOKonline Outlook 0 09-26-2014 05:39 AM
Why vba code stops working after a document open command? Uncheck Checkbox Code not working if document protected bandrist Word VBA 2 08-14-2013 09:02 AM
VB code from one document runs on other open documents beav_35 Word VBA 0 11-10-2010 02:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:03 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