Masterpsyker
New Member
- Joined
- Feb 7, 2009
- Messages
- 19
I'm working on a macro right now and I've run across a problem that I don't know how to solve on my own.
The macro I am creating will be used once a year to consolidate data across workbooks and worksheets that retain a constant structure. They never change in structure, only in data.
The macro needs to do the following:
Item 4 is something I'm wondering about. Does anyone know the VBA function to copy an entire worksheet (name and everything) from one workbook to the next?
At the end of the macro, the two opened workbooks should be closed without saving changes.
I already have user input boxes created, but do not know what to put in them for buttons and commands assigned to those buttons.
How do I do these things?
The macro I am creating will be used once a year to consolidate data across workbooks and worksheets that retain a constant structure. They never change in structure, only in data.
The macro needs to do the following:
- Create a new workbook (no problem here)
- Open a workbook from last year (Problem)
- Open a workbook from the current year (Problem)
- Copy specific worksheets from the now open workbooks to the new workbook (Can I copy a whole worksheet in VBA?)
- Run opperations (no problems here)
Item 4 is something I'm wondering about. Does anyone know the VBA function to copy an entire worksheet (name and everything) from one workbook to the next?
At the end of the macro, the two opened workbooks should be closed without saving changes.
I already have user input boxes created, but do not know what to put in them for buttons and commands assigned to those buttons.
How do I do these things?