none
Problem to go to another Window RRS feed

  • Question

  • Hi,

    Further to thisI still get

    due to this line

                    Application.Workbooks(Window1).Activate

    when clicking Button Generate Departure List (on Main Sheet) of this file.


    Many Thanks & Best Regards, Hua Min


    Thursday, March 8, 2018 1:19 PM

Answers

  • Hi HuaMin  Chen,

    I can see that When you click on the button, You set the value of "Window1".

    After that you reassign the Window1 variable 2 times.

    When you assign the value , You use the full name of workbook which looks like below.

    You just need to pass the workbook name, There is no need to pass the full name of workbook.

    You need to chnage your code like below.

    Below is the value you get by this line of code. You can find the difference.

    Below is the debugging result, where you can notice that code working and not generating any error.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jackson_1990 Friday, March 9, 2018 1:00 PM
    Friday, March 9, 2018 2:41 AM
    Moderator