Windows().Activate works on every computer except one

前端 未结 1 1579
故里飘歌
故里飘歌 2020-11-29 14:00

I have encountered a strange problem, I made macro about a year ago and it is being used every month without problems. Yesterday my boss to

相关标签:
1条回答
  • 2020-11-29 14:29

    Whether or not you can leave off the file extension when calling (eg)

    Windows("MyxlsbFile") 
    

    or

    Workbooks("MyxlsbFile")
    

    depends on whether the Windows Explorer setting "hide extensions for known file types" has been checked or not: if file extensions are shown in Windows Explorer then you must include the extension when calling WorkBooks().

    I'm guessing this is the issue on the one PC where you have the problem.

    Including the file extension always works (as long as there's no other error of course)

    0 讨论(0)
提交回复
热议问题