Save as VBA function for Excel

Imranshakeel
Imranshakeel used Ask the Experts™
on
Basically my data is coming from Controller in the form of (.Xlsx) format. I want to save it after 5 mint automatically with different extension & also generate a report at user define time.

I face a problem when i save a workbook in different extension at my Drive and then i open it for check, at this moment my VBA script goes on error. How i prevent from it
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
>>at this moment my VBA script goes on error. How i prevent from it
instead of saving the opened workbook into another Excel file, you may just copy the content you want and paste (could be paste as values etc)/save it into a new Excel file instead.

will that make sense to you?
Where is the "VBA script"?

It will not be within the ".xlsx" format file initially (as a workbook with this extension does not contain any 'macro'/Visual Basic for Applications [VBA] code).

Let me see if I understand what you require from what you have provided so far...

a) A "Controller" gives you an MS-Excel (2007-2013 format) workbook file, saved with a ".xlsx" file extension.
b) You wish to (re-)save this file in an automated manner after 5 minutes (of usage/being open) with a different &, as yet, unspecified file extension.
c) At the point of saving the file in this manner you wish to generate a report; again, unspecified.
d) It sounds like the 5 minute interval is "user-defined".
e) Once saved "at my Drive", that you may mean is on your local filing system, on within a repository known as "myDrive" (or similar), if you re-open the workbook, some "VBA script" (that may, or may not, be in the workbook being opened), fails.
f) You would like to know how to prevent the "VBA script" from failing.

Please confirm if any/all/none of this is correct.

Additionally, initial queries:

1. It is unclear whether the file is constantly re-saved every 5 minutes, or just once.
2. What file extension is the file re-saved with?
3. What does the generated report look like?  Is this already written?  Does this use data within the "Controller"-provided file?
4. Where is "my Drive"?  Is that a local (C:, for example) drive, a network drive, uploaded to a web site, or somewhere else?
5. The "VBA script" is an unknown factor; how is this executed?  Can the source code be posted here for review?
6. What error messages are displayed, or what indicates the "VBA script" is not executing as intended?
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial