Hello community,
I am trying to use following VBA , to open each file in folder ( but in folder there are different kind of files too like .pptx etc. ) I want to use it to open only Excel Workbooks
Can anyone tell me what I do wrong?
I am trying to use following VBA , to open each file in folder ( but in folder there are different kind of files too like .pptx etc. ) I want to use it to open only Excel Workbooks
VBA Code:
Do While MyFile <> "" And MyFile Is Workbook
'Opens the file and assigns to the wbk variable for future use
Set wbk = Workbooks.Open(Filename:=MyFolder & MyFile)
wbk.Activate
Can anyone tell me what I do wrong?