Ivan has attended:
Excel VBA Intro Intermediate course
VBA
Can a macro be written which incorporates data from a second workbook?
RE: VBA
Hi Ivan
Thank you for your question regarding Workbooks in VBA.
Yes you can access data in other workbooks in VBA, you will need to open the workbooks.
Dim mybook as Workbook
Dim myotherbook as Workbook
'
Set mybook = ActiveWorkbook
' Open other workbook
Workbooks.Open "Book2.xls"
set myotherbook = ActiveWorkbook
You can then use mybook.Activate and myotherbook.Activate to switch between the two books.
Please let me know how you get on.
Laura GB