drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 543
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and thanks in advance!
I am having problems with the following code and I do not anderstand why
'wFxN is a file (eg: Pl_Proyect_V06.xlsm) I am opening as read only and I would like to close, and them activate ThisWorkbook
What am I missing ?
I am having problems with the following code and I do not anderstand why
'wFxN is a file (eg: Pl_Proyect_V06.xlsm) I am opening as read only and I would like to close, and them activate ThisWorkbook
VBA Code:
Application.Wait Now + TimeValue("00:00:03")
ThisWorkbook.Activate 'Some times I am not able to activate ThisWorkbook unless I go step by step using F8
ThisWorkbook.Activate 'Does no t matter if I put 2 times, some times ThisWorkbook is not the active book
Application.Wait Now + TimeValue("00:00:01")
Application.DisplayAlerts = False
If wFxN <> "" Then
Workbooks(wFxN).Close SaveChanges:=False
'HERE this line closes EXCEL app and reopens it
'If I use F8 excel goes down, quits every book opened and the app is close
'and a few seconds after Excel opens again a normal book, (book1)
End If
What am I missing ?