More Excel Trouble

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
fightcancer
Macro Veteran
Posts: 249
Joined: Fri Apr 15, 2005 8:32 am

More Excel Trouble

Post by fightcancer » Tue Oct 08, 2024 2:58 am

XLBOOK=ERR

Code: Select all

Let>file=C:\AMD\test.xlsx
IfFileExists>%file%
  IfWindowOpen>test.xlsx - Excel
    XLGet>%file%,xlBook
    Mdl>xlBook
  EndIf
EndIf
Any suggestions?

The Excel file is brand new and completely blank.
Windows 10, updated Office 365, MS 15.0.25
Last edited by fightcancer on Tue Oct 08, 2024 2:26 pm, edited 1 time in total.

fightcancer
Macro Veteran
Posts: 249
Joined: Fri Apr 15, 2005 8:32 am

Re: More Excel Trouble

Post by fightcancer » Tue Oct 08, 2024 12:57 pm

An "Online Repair" of Office 365 (in Windows 10's Control Panel, Programs, Uninstall a program, Microsoft Office 365, Change) seems to have fixed it. I had previously tried "Quick Repair" which did not help.

EDIT: After weeks of testing, an "Online Repair" of Office 365 doesn't help at all. The only thing that helps is allowing Macro Scheduler to open Excel. I use this code.

Code: Select all

Let>ExcelName=[window name when the Excel file is open in Excel]
Let>xlWbk=[path]
IfNotWindowOpen>%ExcelName%
  ExecuteFile>%xlWbk%
  Goto>EndMacro
EndIf 
(Use ExecuteFile> if you want access to your macros.)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts