C
catlair
Hi,
Am pretty new to this macro stuff and have no VBA knowledge. I have
created a macro that will run from one file dedicated to a set of
macros to pull out some data from a master file, run an autofilter,
create a new workbook and then paste the new data into the new
workbook.
What I would like to do is before the macro runs the autofilter verify
if the master file is open. If it is then use it. If not then open it.
I have tried the following (place it within the macro) but it doesn't
work:
If ("MyWorkBook.xls").Open = True Then
Cells.Select
Selection.autofilter
ActiveWindow.SmallScroll ToRight:=6
Selection.autofilter Field:=15, Criteria1:="Field"
Else
Workbooks.Open Filename:= _
"Macintosh:Users:Meocumentsiroas:MyWorkBook.xls"
Windows("MyWorkBook.xls").Activate
End If
Any help will be most appreciate!
catlair
Am pretty new to this macro stuff and have no VBA knowledge. I have
created a macro that will run from one file dedicated to a set of
macros to pull out some data from a master file, run an autofilter,
create a new workbook and then paste the new data into the new
workbook.
What I would like to do is before the macro runs the autofilter verify
if the master file is open. If it is then use it. If not then open it.
I have tried the following (place it within the macro) but it doesn't
work:
If ("MyWorkBook.xls").Open = True Then
Cells.Select
Selection.autofilter
ActiveWindow.SmallScroll ToRight:=6
Selection.autofilter Field:=15, Criteria1:="Field"
Else
Workbooks.Open Filename:= _
"Macintosh:Users:Meocumentsiroas:MyWorkBook.xls"
Windows("MyWorkBook.xls").Activate
End If
Any help will be most appreciate!
catlair