jamiguel77
Active Member
- Joined
- Feb 14, 2006
- Messages
- 387
- Office Version
- 2016
- 2010
- 2007
- Platform
- Windows
- Web
hi all
i have this VBA code:
Dim wbk As Workbook
Dim wbk2 As Workbook
Set wbk2 = Workbooks.Open(Filename:=F2)
Set wbk = Workbooks.Open(Filename:=F1)
of course F1 and F2 is a Correct filenames with path.....
My question is how to know if workbook: wbk is already opened? (for not reopen....) and of course assign to variable something like this:
if (Workbooks.Open(Filename:=F1) = opened ) then
else
Workbooks.Open(Filename:=F1)
endif
thanks
i have this VBA code:
Dim wbk As Workbook
Dim wbk2 As Workbook
Set wbk2 = Workbooks.Open(Filename:=F2)
Set wbk = Workbooks.Open(Filename:=F1)
of course F1 and F2 is a Correct filenames with path.....
My question is how to know if workbook: wbk is already opened? (for not reopen....) and of course assign to variable something like this:
if (Workbooks.Open(Filename:=F1) = opened ) then
else
Workbooks.Open(Filename:=F1)
endif
thanks