Hi there to everyone, this here is my first post after my introduction post.
I will explain what I am trying to do, basically I need a macro (name of the macro: ImportData) in my current opened workbook ("MyCurrentWorkboook.xlsm") that does following in chronological order;
1. Open a database file (workbook "DATABASE.xlsm")
2. Copy a range from a sheet in that workbook
3. Go back to my current opened workbook ("MyCurrentWorkboook.xlsm")
4. Paste the range in a range I need
5. Close the databasefile
Nothing too difficult one might think.
I got the code working but only when I hardcode the filenames. The databasefile is not a problem for it is a static document, always. But I don't know the name of my current opened workbook, the file itself gets copied over and over again so the name changes depending on the project. So how do I cange the code in order it uses the current workbookname?Please Login or Register to view this content.
This is where it becomes a drama:
Any help on this one is much appreciated thanks in advance!Please Login or Register to view this content.
Bookmarks