Hello, is it possible to set a filename using VBA with no user prompt during a Macro?
For example, like this:
Any help will be greatly appreciated.![]()
Please Login or Register to view this content.
Hello, is it possible to set a filename using VBA with no user prompt during a Macro?
For example, like this:
Any help will be greatly appreciated.![]()
Please Login or Register to view this content.
for an open workbook you would have to save the workbook as the new name. for a closed file you can use the Name command.
Josie
if at first you don't succeed try doing it the way your wife told you to
you can rename an open workbook ,i don't know how but asap utilities includes a "rename current file" option which changes the name of the workbook you are currently using so it must be possible!
ah i see you have to have saved the file first then it can be renamed while open.i supose it needs to know the dir path
Last edited by martindwilson; 06-15-2012 at 05:22 AM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
it probably does a saveas and deletes the old file.
That's a bit more than I'm willing to do, is this possible instead?
In my macro, I have this, which means the file needs to be called Standard.xls or it'll throw an error.
Is it possible to do this..![]()
Please Login or Register to view this content.
Does this make sense? Sorry for silly syntax, I'm still learning.![]()
Please Login or Register to view this content.
use a workbook variable
if the workbook is the one containing the code, you can just refer to ThisWorkbook instead.![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks