Why am I getting a run time error on the first sub?
Please Login or Register to view this content.
Why am I getting a run time error on the first sub?
Please Login or Register to view this content.
*******************************************************
HELP WANTED! (Links to Forum threads)
Trying to create reusable code for Custom Events at Workbook (not Application) level
*******************************************************
A Workbook is an element in the Workbooks collection. To create a new workbook within the collection requires using the .Add method. The New keyword doesn't add to the collection.
Last edited by AlphaFrog; 11-22-2013 at 01:51 AM.
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
Please forgive my ignorance. I have two questions on your reply:
- Is it possible to create a new Excel file/WB without adding to a collection?
- When would you use New to create a new object?
create a new Excel file/WB without adding to a collection?Please Login or Register to view this content.
Entia non sunt multiplicanda sine necessitate
Where would the workbook exist if it wasn't a member of the Workbooks collection?
If posting code please use code tags, see here.
You should install Help on your computer.Please Login or Register to view this content.
Then create someexistingfile.xlsx as an empty workbook.
It is surely possible to duplicate Window's ability to create a new .xxx document in a folder. If I learned how, I would make no attempt to remember it or write it down.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks