Excel macro from Word - excel

I have a process consisting of 15 macros. Each of them has to be run separately after closing and reopening Excel, otherwise excel crushes. It seems to be inefficient, so I am thinking of creating a macro in MS WORD, which could open an Excel Workbook, call a macro in it, close the WB, and do it again with the next macro.
I tried this: https://support.microsoft.com/ru-ru/help/177760/acc97-how-to-run-macros-in-other-office-programs
But it didn't help. Something is happening, but visually Excel doesn't open. If I try to open this WB - it will say it's opened, but I can't see it and it's definitely not faster.
Any ideas?

Related

When I close one excel workbook, any other workbook i have open skips back to the first worksheet

When I close one excel workbook, any other workbook i have open skips back to the first worksheet.
I have a workbook open with multiple tabs, and for example I am working on the 20th tab, if I close any other workbook (either saving or not saving), then the open workbook will quickly flash and then I will be on the first tab. It can get frustrating to keep going back to the tab I am working on, this is happening with ym whole organisation so it could be something that happened when we upgraded to Office365. Has anyone else had this issue? Unfortunately working in one workbook at a time isn't an option in my job. Thanks in advance :)

Excel shut down when I try open Macro

One of my excel (excel A) shut down, when I try View Macro. I have enable all macros and when I try view macro from another workbook (when excel A is closed) I can. But when I have open Excel A I can not look on any macro in any workbook. It always shut down all workbooks I have open. I edit excel A 5 day ago and it works fine.
Any idea how to fix it?
I already try reset PC, open from empty excel (open and repair, open read only, ...) Nothing helps
Thanks everybody for help. At the end i fix it this way.
Open and Repair and choose Extract Data. I have to add macro buttons again, but I can view and modify macro codes :)

Progress bar to indicate file is being saved doesn't go away

I have an Excel macro that opens a workbook, does some operations, saves and closes it. It worked for the last 2 years.
TITUS was installed on my work machine and because of this, I have to choose a document classification manually every time code tries to save the workbook.
As a workaround, I use Application.EnableEvents = False before save and close statements. After that, the macro sometimes stops at save bar like shown in this image: Save bar
The workbook is saved but the save bar doesn't close and halts the macro from opening any other workbooks. This occurs randomly for random workbooks. For example, when workbook 3 had this issue, if I run the macro on workbook 3 again, it might or might not cause the trouble.

Unable to Close Excel Workbook without SaveAs Prompt

Hi there I have thorny little problem thats causing me a major headache, I have a section of code in VB.NET where I need to close the current Excel workbook, however whenever I make the call to:
'Now force a close of the active workbook without saving
_myXLApp.Workbooks(1).Close(Excel.XlSaveAction.xlDoNotSaveChanges)
The SaveAs dialog gets displayed... How do I prevent this from happening? My understanding of the code is that making the call as above should close the workbook without any SaveAs prompt. Any assistance much appreciated.
Kind Regards
paul J.
Try this instead:
_myXLApp.Workbooks(1).Close(SaveChanges:=False) 'Instead of Excel.xlSaveAction.xlDoNotSaveChanges
This should do the trick. Any time I've closed Excel workbooks in VB.Net this is the command I use. It actually mirrors the Excel VBA Format.

Excel Open 2 Workbooks at the same time

I have a workbook that I open with vba coding. There are several different userforms to input data and get reports out of this workbook.
It seems that while this workbook is open, and active, I cannot open, to look at and/or edit, an unrelated excel spreadsheet through Windows Explorer. One of my users asked me if while this program is running if she could look at (without closing the active workbook) a different spreadsheet. It has nothing to do with coding such a request into the active workbook, its more for convenience i.e. not having to close this one and open that one.
Is there anything I can do to facilitate this request? Is there some vba code I can use in my active workbook that allows or gives Excel permission to open more than one workbook?
I think you'll find it is when a Userform or any other Excel dialog-based object is open, then you cannot simply "double-click" on an another workbook to open, as Excel is busy and focus on the open dialog screen.
However, if you start another instance of Excel (Start -> All programs -> Microsoft Excel) and then open the workbook from within the new instance, then you work with additional workbooks.

Resources