+ Reply to Thread
Results 1 to 4 of 4

Workbooks.open method - vbs code

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    melbourne australia
    MS-Off Ver
    Excel 2016
    Posts
    58

    Workbooks.open method - vbs code

    Hi Guys

    I have a bit of a problem. i have created an excel file that calculates leave for every calender week. i have installed the analysis toolpak add in and used the = weeknum() function. . it all works great when i open the file by clicking the .xls file.

    The problem i have is when i open the vbs file that i have created to open this .xls daily and update it. it opens the file but does not display the weeknumbers and saves the .xls file without weeknumbers.The file size varies when i open the file directly as opposed to opening it via vbs. i am definately missing something.

    thanks in advance

    the vbs code i use is
    Please Login or Register  to view this content.
    Last edited by virencm; 01-05-2011 at 06:56 PM. Reason: Added Code Tags

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Workbooks.open method - vbs code

    Try changing the first bit to:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    12-13-2010
    Location
    melbourne australia
    MS-Off Ver
    Excel 2016
    Posts
    58

    Re: Workbooks.open method - vbs code

    excellent !!!
    that fixed my problem. thank you Romperstomper

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Workbooks.open method - vbs code

    Glad to help - please don't forget to mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1