awsumchillicrab
Board Regular
- Joined
- Jan 30, 2011
- Messages
- 56
I store my macros in a spreadsheet "A", and so I have to manually open "A" in order to run my macro on another open spreadsheet. I guess that's acceptable since I don't want to add a quickaccess button.
But...after the macro finishes, I want spreadsheet "A" to close automatically.
I know a simple code like this would work:
But here's the thing - the instruction to close the file and break any connection to the macro code is itself in the macro, by being before "End Sub".
That's just troubling to me. I feel like my macro isn't completely run and that it will be an issue somewhere, somehow. Is this just a purist pursuit, or is there a better way of achieving my goal?
But...after the macro finishes, I want spreadsheet "A" to close automatically.
I know a simple code like this would work:
ThisWorkbook.Close
End Sub
But here's the thing - the instruction to close the file and break any connection to the macro code is itself in the macro, by being before "End Sub".
That's just troubling to me. I feel like my macro isn't completely run and that it will be an issue somewhere, somehow. Is this just a purist pursuit, or is there a better way of achieving my goal?